title: Change type of column into numeric?
body: <p>The data is as under.</p>
  
  <pre><code> r
    V1 V2 V3 V4 V5
  1  C  1  1  0 16
  2  A  1  1 16  0
  3  A  1  1 16  0
  class(r)
  [1] "data.frame"
  class(r[,2])
  character
  </code></pre>
  
  <p>I change 2 till 5 column into numeric with four statement.</p>
  
  <pre><code>as.numeric(r[,2])-&gt;r[,2]
  as.numeric(r[,3])-&gt;r[,3]
  as.numeric(r[,4])-&gt;r[,4]
  as.numeric(r[,5])-&gt;r[,5]
  </code></pre>
  
  <p>How can I change it with just one statement?</p>