title: Select all columns except specific (by name) in R?
body: <p>I have the following dataframe:</p>
  
  <pre><code>a b   c   d   e      
  1 rr  dfv 5   0.1
  9 t   rr1 222 0.44
  7 sdf we  1   0.111
  </code></pre>
  
  <p>I want to select all columns except say d and e.
  I know I can use subset for this: <code>subset(df, -c(d, e))</code>
  Why can't I do <code>df[,-c(d,e)]</code>?</p>
  
  <p>Please advise.</p>
  
  <p>P.S @sotos and others:</p>
  
  <p>x[,-c("b", "c")] Error in -c("b", "c") : invalid argument to unary operator </p>