[R] data frame to matrix

mel mel at altk.com
Wed Jan 23 08:35:24 CET 2008


My Coyne a écrit :
> I have a data frame and would like to convert it into a matrix, how do I do
> that?

either use the df for the initialisation values
mat = matrix(df, ...)
or
as.matrix() could do the trick.



More information about the R-help mailing list