title: R Apply function on data frame columns
body: <p>I have a function in R to turn factors to numeric:</p>
  
  <pre><code>    as.numeric.factor &lt;- function(x) {as.numeric(levels(x))[x]}
  </code></pre>
  
  <p>and I have a dataframe that consists of both factors, numeric and other types of data.
  I want to apply the functions above at once on the whole dataframe to turn all factors to numeric types columns.
  Any idea ?
  thanks</p>