title: How to select random samples in a dataframe?
body: <p>I am using the following command to create 50 random samples in a dataset.
  and I want to know the mean of observations(area).</p>
  
  <pre><code>ds1 %&gt;%
    sample_n(size = 50) %&gt;%
    summarise(x_bar = mean(area))
  </code></pre>
  
  <p>But I get </p>
  
  <pre><code>Error in function_list[[i]](value) : could not find function "sample_n"
  </code></pre>
  
  <p>I tried searching for the function sample_n using getAnywhere() but I didn't find the object.</p>
  
  <p>Instead it works when I use,</p>
  
  <pre><code>ds1_samp3 &lt;- 
    ames[sample(nrow(ds1), 1000), ]
  
  ds1_samp3 %&gt;% 
    summarise(mu = mean(area))
  </code></pre>
  
  <p>Just want to know why the first command doesn't work?</p>
  
  <p>Thanks,
  Vkva</p>