Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upggsurvplot(): Option to add 'all' patients' Survival Curves Needed #194
Comments
|
New option added now in
# Load required packages
library("survival")
library("survminer")
# Fit survival curves
fit <- surv_fit(Surv(time, status) ~ sex, data = lung)
# Visualize survival curves
ggsurvplot(fit, data = lung,
risk.table = TRUE, pval = TRUE,
surv.median.line = "hv", palette = "jco")
Use add.all = TRUE option # Add survival curves of pooled patients (Null model)
# Use add.all = TRUE option
ggsurvplot(fit, data = lung,
risk.table = TRUE, pval = TRUE,
surv.median.line = "hv", palette = "jco",
add.all = TRUE) |
|
when i use "add.all=TRUE", got a error message(Error in model.frame.default(formula = surv.object ~ strata.val, data = list( : variable lengths differ (found for 'strata.val')), it works fine without "add.all", any ideas? Thanks, |


(User request by e-mail)
A simple option to do this is needed.
related issue: #98