ggrisktable: Create a ggplot2 table showing the number at risk
Description
A simple wrapper function which calculates the
numbers at risk for a survival model and a given set of time points then
creates a ggplot2 table with them.
Usage
ggrisktable(
fit = NULL,
times = NULL,
text.color = "black",
strata.order = NULL
)
Value
An unformatted ggplot2 table showing the number at risk.
Arguments
fit
Required. survival::survfit() object.
times
Required. Numeric. One or more time points to calculate
the number at risk for.
text.color
Optional. Character. Color of text within table. Defaults
to 'black'.
strata.order
Optional. Character. Ordered names of strata factor
levels.