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

dropCovFromFormla(covs, formla)

Arguments

covs

should be a list of variable names

formla

which formula to drop covariates from

Value

formula

Examples

formla <- y ~ x + w + z
dropCovFromFormla(list("w","z"), formla)
#> y ~ x
#> <environment: 0x5636a0a358e8>

dropCovFromFormla("z", formla)
#> y ~ x + w
#> <environment: 0x5636a0b9db98>