Description Usage Arguments Value Examples
Transform a data frame into a matrix using one hot encoding.
1 | as_model_matrix(df, intercept = FALSE)
|
df |
A data frame. |
intercept |
Whether to have a column with all |
A matrix.
1 2 | mat <- as_model_matrix(iris)
str(mat)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.