pluck_survival_analysis {survivalAnalysis} | R Documentation |
Access individual components of univariate survival analysis
Description
Allows access to the analyse_survival
result object.
Usage
pluck_survival_analysis(result, term)
Arguments
result |
An object of class SurvivalAnalysisUnivariateResult
as returned by analyse_survival
|
term |
The item to be retrieved:
-
"survfit" containing the result of the survfit function
-
"survdiff" containing the result of the survdiff function
-
"survfit_overall" containing the result of the survfit
function without terms, i.e. the full group not comparing subgroups
-
"coxph" containing the result of the coxph function
-
"p" The log-rank p value (if by provided at least two strata)
|
Value
object as specified by term
, or NULL if not contained in result
Examples
library(magrittr)
library(dplyr)
survival::aml %>%
analyse_survival(vars(time, status), x) %>%
pluck_survival_analysis("p") %>%
print
[Package
survivalAnalysis version 0.3.0
Index]