title: Quickest way to exclude variables with zero variance in R
body: <p>I am working with a very huge .csv dataset for an evaluation and yet I have got this error to resolve.</p>
  
  <pre><code>Warning in preProcess.default(data, method = c("center", "scale")) :
    These variables have zero variances: num_outbound_cmds, is_host_login
  Error in do_one(nmeth) : NA/NaN/Inf in foreign function call (arg 1)
  </code></pre>
  
  <p>What is the quickest way to exclude variables in my dataset <code>whose variance is zero (0)</code>?</p>