Skip to contents

drop_cov_from_formula adds drops some covariates from a formula; covs should be a list of variable names

Usage

drop_cov_from_formula(covs, formula)

Arguments

covs

should be a list of variable names

formula

the formula to drop covariates from

Value

formula

Examples

ff <- y ~ x + w + z
drop_cov_from_formula(list("w", "z"), ff)
#> y ~ x
#> <environment: 0x55ef7ae60ba8>

drop_cov_from_formula("z", ff)
#> y ~ x + w
#> <environment: 0x55ef7a386198>