title: How to obtain all possible sub-samples of size n from a dataframe of size N in R?
body: <p>I have a dataframe with 20 classrooms [1 to 20] indexes and 20 different number of students in each class, how to obtain all sub-samples of size n = 8 and store them because i want to use them later for calculations. I used <code>combn()</code> but that takes only one vector, can i use it with a dataframe and how? (sorry but i'm new in R), 
  dataframe below:</p>
  
  <blockquote>
  <pre><code>   classrooms students
  1           1       29
  2           2       30
  3           3       35
  4           4       28
  5           5       32
  6           6       20
  7           7       25
  8           8       22
  9           9       32
  10         10       26
  11         11       27
  12         12       34
  13         13       27
  14         14       28
  15         15       33
  16         16       21
  17         17       36
  18         18       24
  19         19       19
  20         20       32
  </code></pre>
  </blockquote>