View source: R/removeConstantTerms.R
removeConstantTerms | R Documentation |
Remove constant terms from formula. Also remove categorical variables with a max of one example per category
removeConstantTerms(formula, data)
formula |
original formula |
data |
data.frame |
Adapted from MoEClust::drop_constants
a formula, possibly with terms omitted.
# Valid formula
removeConstantTerms(~ group + extra, sleep)
# there is no variation in 'group' in this dataset
removeConstantTerms(~ group + extra, sleep[1:3, ])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.