title: One way among different expressions of "subset()" function failed in R
body: <p>I found in the Help file of <code>subset()</code> that different syntax occur for the "selection" or "inverse selection". Specifically, in "selection" example, the columns's name are surrounded by <code>c()</code>, but in "inverse selection", there is no <code>c()</code>. In addition, they both don't have quatation mark. So I tried some different syntax:</p>
  
  <pre><code>## For `selection` 
  # standard usage in Help
  subset(airquality, select = c(Temp))
  
  # some different syntax
  # (1a) add quotation mark: worked
  subset(airquality, select = c("Temp"))
  # (2a) remove "c()": worked
  subset(airquality, select = Temp)
  
  ## For `inverse selection` 
  # standard usage in Help
  subset(airquality, select = -Temp)
  
  # some different syntax
  # (1b) add "c()": worked
  subset(airquality, select = -c(Temp))
  # (2b) add quotation mark: failed
  #     Error in -c("Temp") : invalid argument to unary operator
  subset(airquality, select = -c("Temp"))
  </code></pre>
  
  <p>These non-standard usage all worked, except the last example. The last example generated an error: <code>Error in -c("Temp") : invalid argument to unary operator</code></p>
  
  <p>I have two questions:</p>
  
  <p>(1) Why does this error occur? Because in <code>(1a)</code> and <code>(2b)</code>, these two non-standard usage seems the same, but <code>(1a)</code> succeeded, while <code>(2b)</code> failed.</p>
  
  <p>(2) Could someone tell me when should I use <code>c()</code>, or <code>""</code> in <code>c()</code>?</p>