Re: [R] Changing variable class problems

2010-09-15 Thread Joshua Wiley
Hi Richard, Something like workf[ , columns] <- data.frame(lapply(workf[, columns], as.numeric)) should do what you're after. However, this is really a bit of a work around to the real problem. Can you provide more details on the csv file you are reading in? Perhaps the first couple rows or som

[R] Changing variable class problems

2010-09-15 Thread Richard Barfield
I'm reading in some data from a csv file, and it's reading in some of the columns as character variables instead of numeric. I know I can fix this by doing as.numeric for each of the columns, but the problem is I have a LOT of different quantitative variables that I would have to do this for. I've