title: Change the class of columns in a list of data frames
body: <p>I have a list of data frames, e.g.</p>
  
  <pre><code>df1 = data.frame(ID=c("id1", "id2", "id3"), A1 = c("A", "A", "B"), A2 = c("AA", "AA", "AA"))
  df2 = data.frame(ID=c("id2", "id3", "id4"), A1 = c("B", "B", "B"), A2=c("BB", "BB", "BB"))
  df3 = data.frame(ID=c("id1", "id2", "id3"), A1 = c("A", "A", "A"), A2 = c("AA", "BB", "BB"))
  listDF = list(df1, df2, df3)
  </code></pre>
  
  <p>I am wondering if there is a good way to change the class from factor to character. This is what I have tried:</p>
  
  <pre><code>d &lt;- lapply(listDF, function(x) sapply(x[,"A1", "A2"], as.character))
  </code></pre>
  
  <p>This code gives me the columns I want to change, but is there a way to just change the class and not have to re-append these new columns?</p>