get_caret_dummyvars_df {mikropml} | R Documentation |
Get dummyvars dataframe (i.e. design matrix)
Description
Get dummyvars dataframe (i.e. design matrix)
Usage
get_caret_dummyvars_df(features, full_rank = FALSE, progbar = NULL)
Arguments
features |
dataframe of features for machine learning |
full_rank |
whether matrix should be full rank or not (see 'caret::dummyVars) |
progbar |
optional progress bar (default: |
Value
design matrix
Author(s)
Zena Lapp, zenalapp@umich.edu
Examples
## Not run:
df <- data.frame(
outcome = c("normal", "normal", "cancer"),
var1 = 1:3,
var2 = c("a", "b", "c"),
var3 = c("no", "yes", "no"),
var4 = c(0, 1, 0)
)
get_caret_dummyvars_df(df, TRUE)
## End(Not run)
[Package mikropml version 1.6.1 Index]