title: sampling by group in R
body: <p>I have a large sample data of healthcare data called oct</p>
  
  <pre><code>Providers  ID date ICD
  Billy  4504 9/11 f.11
  Billy  5090 9/10 r.05
  Max   4430  9/01 k.11
  Mindy 0812 9/30  f.11 
  etc. 
  </code></pre>
  
  <p>I want a random sample of ID numbers for each provider. I have tried. </p>
  
  <pre><code>review &lt;- oct %&gt;% group_by(Providers) %&gt;% do (sample(oct$ID, size = 5, replace= FALSE, prob = NULL))
  </code></pre>