Description Usage Arguments Value
View source: R/survival_fit_output.R
Plot fit data
1 2 3 4 5 | plot_fit_data(data_to_plot, plot_type = c("survival", "cumulative hazard",
"log cumulative hazard"), plot_groups = NULL, groups = "dist",
scale_time = 1, time_label = "time", max_scaled_time = Inf,
title = NULL, x_axis_gap, legend_loc = "right", logy = NULL,
km_width = 1.25, label_size = 1.25, silence_warnings = FALSE)
|
data_to_plot |
a data frame from
|
plot_type |
|
plot_groups |
which groups should be included in the plot. If NULL, all distributions in the data are included. |
groups |
column name to use for grouping. |
scale_time |
times are multiplied by this. So if your fit was done on a time scale of days, and you want to plot by weeks, set this to 1/7. |
time_label |
the |
max_scaled_time |
maximum time, after scaling by |
title |
for the plot |
x_axis_gap |
distance between breaks on the x axis |
legend_loc |
location for legend - "top", "bottom", "left", or "right" |
logy |
should the |
km_width |
width for the Kaplan-Meier curve line; approximately 0.5 seems to be the standard width for lines |
label_size |
relative multiplier for label size. |
silence_warnings |
suppresses certain warnings |
a ggplot2
plot object
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.