title: R says "Cannot take a sample larger than the population" -- but I am not taking a sample larger than the population
body: <p>I am trying to pick 3500 random observations from a set of 5655 observations. But when I do so, R is throwing a strange error, saying that &quot;cannot take a sample larger than the population when 'replace = FALSE'&quot;</p>
  <p>I am trying to take a sample smaller than the population. Why is R throwing this error?</p>
  <pre><code>nrow(males)
  [1] 5655
  m = sample(males, 3500, replace = FALSE, prob = NULL)
  </code></pre>
  <blockquote>
  <p>Error in sample.int(length(x), size, replace, prob) :
  cannot take a sample larger than the population when 'replace = FALSE'</p>
  </blockquote>