Closed kassambara closed 7 years ago
The new ggsurvplot function would look like this:
ggsurvplot(fit, data, color = NULL, palette = NULL, group.by = NULL,
facet.by = NULL, combine = NULL, add.all = NULL, .....){
if(is.list(fit))
ggsurvplot_list(fit, data...)
else if(!is.null(group.by))
ggsurv_plot(fit, data, group.by, ...)
.......
}
To keep things simple, we need a family of ggsurvplot functions:
These functions will be internally called by the main function ggsurvplot()
depending on the situation.
Other small functions needed:
We need a more generic function surv_plot()
, that will be a wrapper around the ggsurvplot_*()
family functions.
The final list would be:
1. For visualization:
ggsurvplot_*()
functions2. For fitting and describing
ggsurvplot() help page reorganized and new functions added: New functions added:
Capabilities of the current version:
New features to be added:
Supports a list of survfit objects:
ggsurvplot(fit.list)
==> Returns a list of ggsurvplot. see this #197Plots survival curves for a data set grouped by one or two grouping variables. For example one might like to plot the survival curves of patients treated by drug A vs patients treated by drug B in a dataset grouped by TP53 mutation and/or RAS mutation:
Returns a list of ggsurplots. One can (optionally) arrange ggsurvplots using arrange_ggsurvplots()
Supports faceting. Computes and displays specific pvalue for each panel:
ggsurvplot(fit, facet.by = "tp53.mutation")
. see this 190New option 'add.all' . One might like to plot survival curves of patients stratified by grouping variables, and to add on the same plot, the survival curves of 'all' patients (NULL model):
ggsurvplot(fit, add.all = TRUE)
. User request at #98Plotting survival curves from a data frame containing survival curves summary.
Combine multiple survfits object on the same plot. User request at: https://github.com/kassambara/survminer/issues/195