title: Calculate percentage of each category in each group in R
body: <p>I have a data frame like this</p>
  
  <pre><code>Group    Category    Freq
  1       A           2
  1       B           3
  1       C           5
  2       A           3
  2       B           1
  2       C           6
  </code></pre>
  
  <p>I want to introduce a fourth column which calculates the percentage of each category inside each group.</p>
  
  <pre><code>Group    Category    Freq       % (calculated per group, for categories)
      1       A           2       20
      1       B           3       30
      1       C           5       50
      2       A           5       25
      2       B           1       5
      2       C           14      70
  </code></pre>
  
  <p>I tried the following (No success)</p>
  
  <pre><code>as.data.frame(prop.table(table(myDF),1)*100)
  </code></pre>
  
  <p>Is there any other way to do this?</p>