This function converts data frames to matrix data type.
df2matrix(d, n = c())
d
The data frame
n
The column names to be converted. Null for all data frame columns
The data frame converted to a matrix