title: Looking for percentage within a specific entry in column R
body: <p>I'm trying to figure out percentage by race in my data frame. Each race has a different population, so I'm trying to scale the prescriptions by race to see if there exist discrepancies within psychiatric drug prescriptions. My data looks like this:</p>
  <pre><code>Prescription.      Race            Frequency
  
  Ambien             Black           3 
  
  Ritalin            Black           2
  
  Lamotrigine        Black           1
  
  Xanax              Black           7
  
  Wellbutrin         Black           4
  
  Ambien             White           5 
  
  Ritalin            White           10
  
  Lamotrigine        White           8
  
  Xanax              White           3
  
  Wellbutrin         White           5
  
  Ambien             Latino          4 
  
  Ritalin            Latino          5
  
  Lamotrigine        Latino          10
  
  Xanax              Latino           3
  
  Wellbutrin         Latino           4
  
  </code></pre>
  <p>I'd like to add a column that indicates percentages in terms of racial population. For instance, if 20 black patients exist, and 2 of them are prescribed Ritalin, that gives Ritalin a 10% prescription rate within specifically black patients. Thanks for your help!</p>