data.matrix {base} | R Documentation |
Return the matrix obtained by converting all the variables in a data frame to numeric mode and then binding them together as the columns of a matrix. Factors and ordered factors are replaced by their internal codes.
data.matrix(frame)
frame |
a data frame whose components are logical vectors, factors or numeric vectors. |
Chambers, J. M. (1992) Data for models. Chapter 3 of Statistical Models in S eds J. M. Chambers and T. J. Hastie, Wadsworth & Brooks/Cole.
as.matrix
,
data.frame
,
matrix
.