removeConstantTerms: Remove constant terms from formula

View source: R/removeConstantTerms.R

removeConstantTermsR Documentation

Remove constant terms from formula

Description

Remove constant terms from formula. Also remove categorical variables with a max of one example per category

Usage

removeConstantTerms(formula, data)

Arguments

formula

original formula

data

data.frame

Details

Adapted from MoEClust::drop_constants

Value

a formula, possibly with terms omitted.

Examples


# Valid formula
removeConstantTerms(~ group + extra, sleep)

# there is no variation in 'group' in this dataset
removeConstantTerms(~ group + extra, sleep[1:3, ])


GabrielHoffman/dreamlet documentation built on July 11, 2024, 1:16 a.m.