Description Usage Arguments Value Methods (by class) Examples
View source: R/get_covariates.R
Extract the equation(s) covariates
1 2 3 4 5 6 7 8 9 10 | get_covariates(x)
## S3 method for class 'eq'
get_covariates(x)
## S3 method for class 'eqs'
get_covariates(x)
## S3 method for class 'eqs_bag'
get_covariates(x)
|
x |
the object |
(chr) covariates of the equation x
eq
: Extract the covariates of the given
eq
uation object.
eqs
: Extract the covariates of the given
eq
uation object.
eqs_bag
: Extract all the possible covariates used
by any eq
uation in the eqs_bag
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | library(equationer)
eq_test <- eq(age = 0.1, bmi = -0.3,
name = "first eq_test",
outcome = "kcal/day",
strata = list(sex = "female")
)
get_covariates(eq_test)
library(equationer)
eq_test <- eq(age = 0.1, bmi = -0.3,
name = "eq_test",
outcome = "kcal/day",
strata = list(sex = "female")
)
eq2_test <- eq(age = 0.1, bmi = -0.3,
name = "eq2_test",
outcome = "kcal/day",
strata = list(sex = "male")
)
eqs_test <- eqs(eq_test, eq2_test, name = "eqs-test")
get_covariates(eqs_test)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.