title: R: "Error in `[.data.frame " and "unused arguments"
body: <p>I have a vector of 20 elements and i want that only 15 elements are assigned to a new vector. When I do that, R poped me up an error, and I tried different combinations. I want to assign elements from 6 to 19.</p>
  
  <pre><code>&gt; carbo&lt;-read.csv(file="6cwga", header=TRUE, sep=",")
  &gt; carbo2 &lt;- carbo[-1,-2,-3,-4,-5,,-20]
  Error in `[.data.frame`(carbo, -1, -2, -3, -4, -5, , -20) : 
    unused arguments (-4, -5, , -20)
  &gt; carbo2 &lt;- carbo[-1,-2,-3,-4,-5,-20]
  Error in `[.data.frame`(carbo, -1, -2, -3, -4, -5, -20) : 
    unused arguments (-4, -5, -20)
  &gt; carbo2 &lt;- carbo[-1,-2,-3,-4,-5,-20,]
  Error in `[.data.frame`(carbo, -1, -2, -3, -4, -5, -20, ) : 
    unused arguments (-4, -5, -20, )
  </code></pre>