View source: R/archive/survplot_eumelareg_old.R
| survplot_eumelareg | R Documentation | 
This function plots a default EuMelaReg survival plot (Kaplan-Meier plot) produced with survminer.
survplot_eumelareg(
  data,
  time = "time",
  status = "status",
  var = NULL,
  xlab = "Time in months",
  ylab = "Probability of Survival",
  axes.offset = FALSE,
  break.y.by = 0.1,
  break.time.by = 3,
  xlim = c(0, 48),
  ggtheme = theme_eumelareg_surv_plot(),
  tables.theme = theme_eumelareg_surv_table(),
  color.table.title = TRUE,
  plot.width = 0.838,
  plot.height = 0.88,
  plot.margin.left = NULL,
  text.size = 12,
  weights = NULL,
  landmarks = c(12, 24),
  conf.type = "log-log",
  risk.table.width = 0.9,
  risk.table.title = NULL,
  legend.position = "top",
  legend.title = "",
  legend.labs = NULL,
  show.pval = TRUE,
  pval.coord = c(1, 0.1),
  merge = FALSE,
  palette = "jco",
  extract.legend = FALSE,
  return.fit = FALSE,
  ...
)
| data | data.frame or data.table containing survival data. | 
| time | the time interval from start of observation until date of event (e.g. disease progression or death) or censoring. | 
| status | variable specifying if event occured or data has been censored. | 
| var | variable tested for Influence on outcome. | 
| xlab | X-axis label. | 
| ylab | y-axis label. | 
| axes.offset | logical value. If TRUE the space between the plot origin and the axes is removed. | 
| break.y.by | interval of breaks on the y-axis. | 
| break.time.by | Interval of breaks on the x-axis (time axis). | 
| xlim | x axis limit. | 
| ggtheme | function, ggplot2 theme name. Default value is theme_eumelareg_surv_plot. Allowed values include ggplot2 official themes: see  | 
| tables.theme | function, ggplot2 theme name. Default value is theme_eumelareg_surv_plot. Allowed values include ggplot2 official themes: see  | 
| color.table.title | logical value. If TRUE table will be colored in the same values as the graph. Default is TRUE. | 
| plot.width | relative width of the survival plot | 
| plot.height | relative height of the survival plot. The risk table is adjusted accordingly. | 
| plot.margin.left | numerical. Used to adjust the plot horizontally. | 
| text.size | size of plot text. | 
| weights | character variable specifying the name of the weights column. Weights have to be added to the original dataframe in order to be applied correctly. | 
| landmarks | times for which landmark survival data shall be provided. Should be given in the same order as those strata. | 
| conf.type | Method to calculate confidence intervals. Log-log method is the default in SAS. | 
| risk.table.width | relative width of the risk table. | 
| risk.table.title | the title to be used for the risk table. Default is no title. | 
| legend.position | he position of legends ("none", "left", "right", "bottom", "top", or two-element numeric vector) | 
| legend.title | name of legend title. | 
| legend.labs | character vector specifying legend labels. Used to replace the names of the strata from the fit. Should be given in the same order as those strata. | 
| show.pval | logical indicating whether pvalue should be displayed. | 
| pval.coord | coords of pvalue within plot. | 
| merge | logical value. If TRUE survival curve and median survival table are plotted in the same graph. Else two separate figures are generated. Default is FALSE. | 
| palette | the color palette to be used. Allowed values include "hue" for the default hue color scale; "grey" for grey color palettes; brewer palettes e.g. "RdBu", "Blues", ...; or custom color palette e.g. c("blue", "red"); and scientific journal palettes from ggsci R package, e.g.: "npg", "aaas", "lancet", "jco", "ucscgb", "uchicago", "simpsons" and "rickandmorty". See details section for more information. Can be also a numeric vector of length(groups); in this case a basic color palette is created using the function palette. | 
| extract.legend | logical indicating whether only the legend should be extracted from the plot to build manual arrangements of plots and legend with  | 
| return.fit | logical indicating whether the fit object should be returned instead of the plot | 
| ... | Futher arguments as described hereafter and other arguments to be passed i) to ggplot2 geom_*() functions such as linetype, size, ii) or to the function ggpar() for customizing the plots. See details section. | 
Further arguments can be obtained from the ggsurvplot() function.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.