[R] read columns of quoted numbers as factors
james hirschorn
j_hirschorn at yahoo.com
Mon Oct 4 18:39:44 CEST 2010
Suppose I have a data file (possibly with a huge number of columns), where the
columns with factors are coded as "1", "2", "3", etc ... The default behavior of
read.table is to convert these columns to integer vectors.
Is there a way to get read.table to recognize that columns of quoted numbers
represent factors (while unquoted numbers are interpreted as integers), without
explicitly setting them with colClasses ?
More information about the R-help
mailing list