-
Notifications
You must be signed in to change notification settings - Fork 167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ggsurvplot(): 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, |
i got the same error. how did you solve this? |
(User request by e-mail)
A simple option to do this is needed.
related issue: #98
The text was updated successfully, but these errors were encountered: