title: R: elegant way to determine numeric variables in a data frame
body: <p>Here's the code I use to find numeric variables in a data frame:</p>
  
  <pre><code>Data &lt;- iris
  numericvars &lt;- NULL
  for (Var in names(Data)) {
      if(class(Data[,Var]) == 'integer' | class(Data[,Var]) == 'numeric') {
          numericvars &lt;- c(numericvars,Var)
      }
  }
  numericvars
  </code></pre>
  
  <p>Is there a less loopy way to do this?</p>