| stratify | R Documentation |
This is a special function that identifies stratification variables when they appear on the right hand side of a formula.
stratify(..., na.group = FALSE, shortlabel, sep = ", ")
... |
any number of variables. All must be the same length. |
na.group |
a logical variable, if |
shortlabel |
if |
sep |
the character used to separate groups, in the created label |
When used outside of a coxph formula the result of the function
is essentially identical to the interaction function,
though the labels from strata are often more verbose.
a new factor, whose levels are all possible combinations of the factors supplied as arguments.
survival::strata, learner_stratify, interaction
a <- factor(rep(1:3, 4), labels=c("low", "medium", "high"))
b <- factor(rep(1:4, 3))
levels(stratify(b))
levels(stratify(a, b, shortlabel=TRUE))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.