[R] Convert list to data frame while controlling column types

Alexander Shenkin ashenkin at ufl.edu
Fri Aug 21 17:47:50 CEST 2009


Hello all,

I have a list which I'd like to convert to a data frame, while
maintaining control of the columns' data types (akin to the colClasses
argument in read.table).  My numeric columns, for example, are getting
converted to factors by as.data.frame.  Is there a way to do this, or
will I have to do as I am doing right now: allow as.data.frame to coerce
column-types as it sees fit, and then convert them back manually?

Thanks,
Allie




More information about the R-help mailing list