| formulae | R Documentation |
Decompose formula objects to treatment, response, covariate, and grouping variables using standardized names
TRTP, AVAL, COVAR, and GROUP respectively.
as_formulae(x, ...)
## S3 method for class 'formula'
as_formulae(x, ...)
x |
a formula object. |
... |
further arguments passed to or from other methods. |
A list with standardised components named AVAL, TRTP,
COVAR, and GROUP where present, containing the original variable
names extracted from x, plus a reconstructed formula.
summaryWO.formula(), stratWO.formula() for use.
# Example 1: All variables present
as_formulae(x = visit4 ~ treatment + age | sex)
# Example 2: Extra covariates, no grouping variable will drop the extra variable
as_formulae(x = visit4 ~ treatment + age + sex)
# Example 3: When more than two grouping variables, the last one will be used.
as_formulae(x = visit4 ~ treatment + age | sex |site)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.