[R] convert data.frame to matrix -> NA factor problem
syrvn
mentor_ at gmx.net
Wed Jul 14 16:18:43 CEST 2010
Hi list,
I tried to convert a data.frame into a matrix using data.matrix.
Unfortunately my matrix contains missing values (NA) wherefore all columns
including NA's were changed into factors.
I thought that many people stumbled across that problem already wherefore
there must be a
simple solution. But it seems there isn't. I tried lapply, replace and other
things in combination
but still did not manage to convert my data.frame into a proper matrix with
numeric values.
Any advice?
Cheers
--
View this message in context: http://r.789695.n4.nabble.com/convert-data-frame-to-matrix-NA-factor-problem-tp2288828p2288828.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list