addCovFromFormla adds some covariates to a formula; covs should be a list of variable names

addCovToFormla(covs, formla)

Arguments

covs

should be a list of variable names

formla

which formula to add covariates to

Value

formula

Examples

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

formla <- ~x
addCovToFormla("z", formla)
#> ~x + z
#> <environment: 0x56369b28f8c8>