title: How to avois this error:only 0's may be mixed with negative subscripts?
body: <p>I have this example:</p>
  
  <pre><code>x=c(NA,  2,  -3,  -4,  -5,  -6,  -7,  -8,  -9, -10, -11,  -2,   2, -14, -15, -16, -17, 2, -19, -20)
  
  g= head(x[!is.na(x)], 13)
  </code></pre>
  
  <p>I want to exclude values that were already used for g.</p>
  
  <pre><code>            y=x[-(head(x[!is.na(x)], 13))]
  
              Is there a better way to do this?
  </code></pre>
  
  <p>I got this error:</p>
  
  <pre><code>Error in x[-(head(x[!is.na(x)], 13))] : 
   only 0's may be mixed with negative subscripts
  
       any idea why?
  </code></pre>