title: Invalid Length Argument
body: <p>I want to convert all the coloumns of my dataframe to numeric format. So I use lapply</p>
  
  <pre><code> data.frame(lapply(dat, numeric))
  </code></pre>
  
  <p>But this is showng me an <strong>invalid length argument</strong> error.
  However, it is working when I tried with individual coloumns.</p>
  
  <pre><code> lapply(dat$x.Type, numeric)
  </code></pre>
  
  <p>But then again I am left to wonder how to update the orginal dataframe with this.</p>
  
  <p>I am guessing the solution to my problem is to run a loop applying lapply through all the coloumns .
  The problem is I am having trouble figuring out how to do that.</p>
  
  <p>Could somebody help me?</p>