Skip to content
Prev 311983 / 398506 Next

wrong data interpretation in R

Also when reading a CSV file, if you do not want characters columns
converted to factors, use 'as.is = TRUE' as one of the parameters.  If
you have a column that is a factor, to convert it to numeric you have
to do the following:

as.numeric(as.character(factorColumn))

notice that you have to convert it to character first; otherwise you
will get the numeric value of the factor which is probably not what
you want.
On Mon, Nov 26, 2012 at 12:02 PM, Sarah Goslee <sarah.goslee at gmail.com> wrote: