title: R - how to prevent row.names when selecting rows from a data frame
body: <p>Suppose I create a dataframe (just to keep it simple):</p>
  
  <pre><code>testframe &lt;- data.frame( a = c(1,2,3,4), b = c(5,6,7,8))
  </code></pre>
  
  <p>Thus, I have two variables (columns) and four cases (rows).</p>
  
  <p>If I select some of the rows BEGINNING WITH THE FIRST row, i get some kind of subset of the dataframe, e.g.:</p>
  
  <pre><code>testframe2 &lt;- testframe[1:2,] #selecting the first two rows
  </code></pre>
  
  <p>But if i do the same with a row NOT BEGINNING WITH THE FIRST ROW, I get another column containing the row numbers of the original dataframe.</p>
  
  <pre><code>testframe3 &lt;- testframe[3:4,] #selecting the last two rows
  </code></pre>
  
  <p>leads to:</p>
  
  <pre><code>  a b
  3 3 7
  4 4 8
  </code></pre>
  
  <p>What can I do to prevent the new row.names variable in the first place? I know that I can delete it afterwards but maybe it is still possible to avoid it from the beginning.</p>
  
  <p>Thanks for your help!</p>