[R] building a data.frame from a matrix: preventing conversion to factors

Christian Gold c.gold at magnet.at
Tue Nov 13 18:55:26 CET 2007


Dear all:

I am trying to build a data.frame from some vectors and some matrices
and seem to be unable to find out how to do this without converting
everything to factors.
I can prevent conversion of the vectors by using I(), as explained in
help(data.frame). However, this doesn't help with the matrices: if I try
I() with the matrix, the matrix gets incorporated into the data frame as
a whole, rather than as a list of vectors as it should be. ("as.is=T"
doesn't help either, and neither does "options(stringsAsFactors = FALSE)".)

Any help would be greatly appreciated!

Christian Gold



More information about the R-help mailing list