dftomat | R Documentation |
This function converts a data frame into a numeric matrix. If the data frame contains factor variables, they are first converted to dummy variables (one-hot encoding). If the data frame contains character variables, they are first converted to factors and then to dummy variables.
dftomat(df)
df |
A data frame to be converted to a numeric matrix. |
A numeric matrix corresponding to the input data frame.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.