I can't get the following formula to coerce selected columns of a data frame to numeric
x<-read.csv("more.csv",colClasses="character")
test<-list(more[,10],more[,11],more[,12])
test2<-lapply(test,as.numeric)
But
is.numeric(more[,10])
[1] FALSE
When I use the following formula it works:
more[,10]<-as.numeric(more[,10])
is.numeric(more[,10])
[1] TRUE
I can't make out the error in the first formula used.