title: Adding percentage labels on pie chart in R
body: <p>My data frame looks like </p>
  
  <pre><code>df
     Group   value
  1 Positive    52
  2 Negative   239
  3 Neutral     9
  </code></pre>
  
  <p>I would like to make a pie chart of the data frame using ggplot.</p>
  
  <pre><code>pie &lt;- ggplot(df, aes(x="", y=value, fill=Group)) +
         geom_bar(width = 1, stat = "identity") +
         coord_polar("y", start=0) 
  </code></pre>
  
  <p>This is my pie chart.</p>
  
  <p><a href="https://i.stack.imgur.com/QtRU8.png" rel="noreferrer"><img src="https://i.stack.imgur.com/QtRU8.png" alt="enter image description here"></a></p>
  
  <p>But when I try to add percentage labels on the chart</p>
  
  <pre><code>pie &lt;- ggplot(df, aes(x="", y=value, fill=Group)) +
         geom_bar(width = 1, stat = "identity") +
         coord_polar("y", start=0) +
         geom_text(aes(y = value/2 + c(0, cumsum(value)[-length(value)]),
                   label = percent(value/300 )), size=5)
  </code></pre>
  
  <p>This is my result.</p>
  
  <p><a href="https://i.stack.imgur.com/mJZn7.png" rel="noreferrer"><img src="https://i.stack.imgur.com/mJZn7.png" alt="enter image description here"></a></p>
  
  <p>I have already seen many same question as mine,i.e  <a href="https://stackoverflow.com/questions/24803460/r-ggplot2-add-labels-on-facet-pie-chart">R + ggplot2 => add labels on facet pie chart </a> and the solutions are not helping.</p>