title: A list of dataframes where column variable type to be changed from character to numeric in R
body: <p>I have created a nested list of dataframes through read.csv and lapply function. This nested list of data frames contains the first column as <code>product</code> and rest 239 columns for data on various countries.
  All the numbers are in character format which I wish to convert into numeric form for each dataframe in the list.
  I have used the following code. But it removes the <code>product</code> column[1] from each dataframe and displays only <code>[2:240]</code> rest of the columns. How to prevent the <code>product</code> column from getting removed?</p>
  
  <pre><code>files &lt;- list.files(path = "D:\\R34\\casia3\\data_kaz\\export\\", pattern = "*.csv")
  
  myfiles &lt;- lapply(files, function(x) {
    df &lt;- read.csv(x, strip.white = T, stringsAsFactors = F, sep = ",")
    df$ID &lt;- as.character(x)
    return(df)
  })
  
  
  myfiles &lt;- lapply(myfiles, function(x) lapply(x[2:240], as.numeric))
  </code></pre>