title: Convert factor to date class for multiple columns
body: <p>I have 7 columns in my dataset. I want to convert 4 variables (2 to 5 column) from factor to date format. I can do it one column at a time, but I want to know if there is a shortcut through which I can convert all of them together.</p>
  
  <p>Currently this is how I do it.</p>
  
  <pre><code>SampleData$column2&lt;-as.Date(SampleData$column2,format="%Y/%m%/%d")
  SampleData$column3&lt;-as.Date(SampleData$column3,format="%Y/%m%/%d")
  SampleData$column4&lt;-as.Date(SampleData$column4,format="%Y/%m%/%d")
  SampleData$column5&lt;-as.Date(SampleData$column5,format="%Y/%m%/%d")
  </code></pre>