title: split dataframe in R by row
body: <p>I have a long dataframe like this:</p>
  
  <pre><code>  Row  Conc   group
    1     2.5    A
    2     3.0    A
    3     4.6    B
    4     5.0    B
    5     3.2    C
    6     4.2    C
    7     5.3    D
    8     3.4    D
  </code></pre>
  
  <p>...</p>
  
  <p>The actual data have hundreds of row.  I would like to split A to C, and D. I looked up the web and found several solutions but not applicable to my case.</p>
  
  <p><a href="https://stackoverflow.com/questions/3302356/r-language-how-to-split-a-data-frame">How to split a data frame?</a></p>
  
  <p>For example:
       Case 1: </p>
  
  <pre><code>x = data.frame(num = 1:26, let = letters, LET = LETTERS)
  set.seed(10)
  split(x, sample(rep(1:2, 13)))
  </code></pre>
  
  <p>I don't want to split by arbitrary number</p>
  
  <p>Case 2: Split by level/factor</p>
  
  <pre><code>data2 &lt;- data[data$sum_points == 2500, ]
  </code></pre>
  
  <p>I don't want to split by a single factor either.  Sometimes I want to combine many levels together.</p>
  
  <p>Case 3: select by row number</p>
  
  <pre><code>newdf &lt;- mydf[1:3,]
  </code></pre>
  
  <p>The actual data have hundreds of rows. I don't know the row number.  I just know the level I would like to split at.</p>