Helper function to select character or factor variables.
1 |
1 2 3 4 | df <- data.frame(a=c(1,2,NA,3), b=c(10,20,30,NA), c=c("c1", NA, "c3", "c3"))
prep <- impute(categoricals, most_frequent)
prep$fit(df)
prep$transform(df)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.