| Type: | Package | 
| Title: | Create Publication Ready Kaplan-Meier Plots | 
| Version: | 1.3.2 | 
| Description: | Incorporate various statistics and layout customization options to enhance the efficiency and adaptability of the Kaplan-Meier plots. | 
| License: | GPL-2 | GPL-3 [expanded from: GPL (≥ 2)] | 
| Encoding: | UTF-8 | 
| RoxygenNote: | 7.3.2 | 
| URL: | https://sakk-statistics.github.io/survSAKK/ | 
| BugReports: | https://github.com/SAKK-Statistics/survSAKK/issues | 
| Suggests: | knitr, rmarkdown, testthat (≥ 3.0.0) | 
| VignetteBuilder: | knitr | 
| Imports: | graphics, grDevices, survival | 
| Config/testthat/edition: | 3 | 
| Depends: | R (≥ 2.10) | 
| LazyData: | true | 
| NeedsCompilation: | no | 
| Packaged: | 2025-05-15 11:41:07 UTC; charlottemi | 
| Author: | Vithersan Somasundaram [aut], Charlotte Micheloud [cre, ctb], Katrin Gobat [ctb], Stefanie Hayoz [ctb], SAKK, CC [cph, fnd], SCTO, Statistics [fnd] | 
| Maintainer: | Charlotte Micheloud <Charlotte.Micheloud@sakk.ch> | 
| Repository: | CRAN | 
| Date/Publication: | 2025-05-15 14:40:02 UTC | 
survSAKK: Create Publication Ready Kaplan-Meier Plots
Description
Incorporate various statistics and layout customization options to enhance the efficiency and adaptability of the Kaplan-Meier plots.
Author(s)
Maintainer: Charlotte Micheloud Charlotte.Micheloud@sakk.ch [contributor]
Authors:
Vithersan Somasundaram Vithersan.Somasundaram@sakk.ch
Other contributors:
Katrin Gobat Ka.Gobat@hotmail.com [contributor]
Stefanie Hayoz Stefanie.Hayoz@sakk.ch [contributor]
SAKK, CC [copyright holder, funder]
SCTO, Statistics [funder]
See Also
Useful links:
Report bugs at https://github.com/SAKK-Statistics/survSAKK/issues
SAKK Esophagus Cancer Data
Description
This anonymized data contains survival data from patients with resectable esophageal carcinoma to compare the outcomes of two treatment regimens: Neoadjuvant chemotherapy followed by chemoradiation and surgery with and without cetuximab.
Usage
esophagus
Format
A data frame with 297 patients and 6 variables:
- arm
 Treatment Arm.
- OS.time
 Overall survival time in years.
- OS.event
 Overall survival status (0 = censored, 1 = event).
- hist
 Histological type of the tumor.
- PFS.time
 Progression-free survival time in years.
- PFS.event
 Progression-free survival status (0 = censored, 1 = event).
Source
SAKK Competence Center, Switzerland
References
Ruhstaller, T., Thuss-Patience, P., Hayoz, S., Schacher, S., Knorrenschild, J. R., Schnider, A., ... & Stahl, M. (2018). Neoadjuvant chemotherapy followed by chemoradiation and surgery with and without cetuximab in patients with resectable esophageal cancer: a randomized, open-label, phase III trial (SAKK 75/08). Annals of oncology, 29(6), 1386-1393.
Publication Ready Kaplan-Meier Estimator
Description
Provide an open-source, user-friendly tool designed to enhance the creation
and customization of Kaplan-Meier plots and incorporating various statistics
and layout customization options using surv.plot(fit, ...).
Arguments
fit | 
 An object of class survival::survfit containing survival data.  | 
ties | 
 String specifying the method for tie handling. If there are no tied death times all the methods are equivalent. Options: "efron", "breslow", "exact". Default: "efron"  | 
reference.arm | 
 A character string specifying the reference arm for comparison.  | 
time.unit | 
 A character string specifying the time unit which was used to create the  Option include:   | 
y.unit | 
 A character string specifying the unit of the y-axis. Option include:   | 
censoring.mark | 
 A logical parameter indicating whether censoring events
should be marked on the survival curves. Default is   | 
censoring.cex | 
 A numeric value specifying the size of the marks for
censored patients. Default is   | 
conf.int | 
 A numeric value controlling the confidence interval on survival curves.
Default is   | 
conf.band | 
 A logical parameter indicating whether to display the
confidence band on the survival curves. Default is   | 
conf.band.col | 
 A colour which is used for the confidence band. Can accept a single colour value or a vector of colours.  | 
conf.band.transparent | 
 A numeric value between   | 
conf.line.lty | 
 A strings specifying the line type of the confidence lines. Options include:   | 
conf.line.lwd | 
 A numeric value specifying the width of the confidence lines.  | 
conf.type | 
 Transformation type for the confidence interval. Options include:   | 
grid | 
 A logical parameter specifying whether to draw a grid.
Default is   | 
col | 
 A colour which is used for the survival curves. Can accept a single colour value or a vector of colours.  | 
main | 
 Title of the plot.  | 
sub | 
 Subtitle of the plot. Note: A subtitle is only displayed if no risk table is shown.  | 
letter | 
 A letter to be displayed on the top to the left of the figure (for example if several plots are displayed in one figure).  | 
letter.cex | 
 The size of   | 
letter.pos.x | 
 The X-axis position of   | 
letter.pos.y | 
 The Y-axis position of   | 
xlab | 
 X-axis label.  | 
ylab | 
 Y-axis label.  | 
xticks | 
 A numeric vector specifying the ticks of the x-axis. Can be specified as  
  | 
yticks | 
 A numeric vector specifying the ticks of the y-axis. Can be specified as  
 Note: It should always be specified as probability.  | 
xlab.pos | 
 Defines the margin line where the X-axis label (xlab) is displayed, starting at 0 and counting outwards. Default is 1.5.  | 
ylab.pos | 
 Defines the margin line the Y-axis label (ylab) is displayed, starting at 0 counting outwards. Default is 3.  | 
xlab.cex | 
 A numeric value specifying the size of the X-axis label.  | 
ylab.cex | 
 A numeric value specifying the size of the Y-axis label.  | 
cex | 
 A numeric value specifying the size of all all text elements (labels, annotations, etc.).  | 
axis.cex | 
 A numeric value specifying the size of the axis elements.  | 
bty | 
 Determines the style of the box drawn around the plot. Options include:   | 
lty | 
 A string specifying the line type of of the curve(s). Options include:   | 
lwd | 
 A numeric value specifying the width of the line.  | 
legend | 
 A logical parameter specifying whether to display legend. By default, the legend is displayed if there is more than one arm.  | 
legend.position | 
 Position of the legend. Options include: "c(x,y)"  | 
legend.name | 
 A vector of character string specifying of the name(s) of the arm(s).  | 
legend.cex | 
 A numeric value specifying the size of the legend text.  | 
legend.text.font | 
 Font style of the legend text. Possible values: 
  | 
legend.title | 
 Title of the legend.  | 
legend.title.cex | 
 A numeric value specifying the size of the legend title.  | 
segment.type | 
 A numeric value specifying the layout of the segment. Possible values: 
  | 
segment.timepoint | 
 A single value or a vector of fixed time points to be drawn as segment(s).  | 
segment.quantile | 
 A single value or a vector of fixed quantile to be drawn as segment(s). Example: 0.5 corresponds to median.  | 
segment.main | 
 Title of the segment text.  | 
segment.confint | 
 A logical parameter specifying whether to display the confidence interval for the segment. Default: TRUE  | 
segment.annotation | 
 Position of the segment annotation. If several quantiles or time points are chosen then
the position can only be set to  Options include:   | 
segment.annotation.offset | 
 The offset used in function   | 
segment.annotation.two.lines | 
 A logical parameter to force that the annotation is displayed on two lines. This parameter only has an effect if there is only one arm. Default: FALSE  | 
segment.annotation.col | 
 A colour which is used for the segment annotation. Can accept a single colour value or a vector of colours.  | 
segment.annotation.space | 
 Spacing between the text in units of y-coordinates.  | 
segment.col | 
 A colour which is used for the segment. Can accept a single colour value.  | 
segment.lty | 
 A strings specifying the line type of the segment(s). Options include:   | 
segment.lwd | 
 A numeric value specifying the width of the segment line.  | 
segment.cex | 
 A numeric value specifying the size of the segment text size.  | 
segment.font | 
 A numeric value specifying the font face. Possible values: 
  | 
segment.main.font | 
 A numeric value specifying the font face for the segment text. Possible values: 
  | 
stat.fit | 
 An object of class survival::survfit containing survival data. Used for calculation of statistics, allowing to add stratification factors. Note: If not specified the   | 
stat | 
 Statistics displayed in the plot. Options: 
 Note: Confidence interval can be adjusted with the argument   | 
stat.position | 
 Position where the  Options include:   | 
stat.conf.int | 
 A numeric value controlling the confidence interval on
the   | 
stat.col | 
 A colour which is used for the statistics text. Can accept a single colour value or a vector of colours.  | 
stat.cex | 
 A numeric value specifying the size of the 'statistics text size.  | 
stat.font | 
 The font face of the statistics Possible values: 
  | 
risktable | 
 A logical parameter indicating whether to draw risk table.
Default is   | 
risktable.censoring | 
 A logical parameter indicating whether to display number of censored patients.
Default is   | 
risktable.pos | 
 Defines on which margin line of the xlab is displayed,
starting at 0 counting outwards.
Default is at line   | 
risktable.name | 
 Names of the arms for the risk table.  | 
risktable.cex | 
 A numeric value specifying the size of the risk table text size.  | 
risktable.col | 
 A coulour which is used for the risk table.
Can accept a single colour value or a vector of colours.
Default is  Note: If   | 
risktable.title | 
 Title of risk table.  | 
risktable.title.font | 
 Font style of the risk table. Possible values: 
  | 
risktable.title.col | 
 A colour which is used for the risk table title. Can accept a single colour value.  | 
risktable.title.position | 
 A numeric value specifying the position of the title on the x-axis.  | 
risktable.title.cex | 
 A numeric value specifying the size of the risk table title size.  | 
risktable.name.cex | 
 A numeric value specifying the size of the risk table legend name size.  | 
risktable.name.font | 
 Font style of the risk table legend name(s). Possible values: 
  | 
risktable.name.col | 
 A colour which is used for the risk table name. Can accept a single colour value.  | 
risktable.name.position | 
 A numeric value specifying the position of the legend name(s) on the x-axis.  | 
margin.bottom | 
 Specifies the bottom margin of the plotting area in line units.
Default is   | 
margin.left | 
 Specifies the left margin of the plotting area in line units.
Default is   | 
margin.top | 
 Specifies the top margin of the plotting area in line units.
Default is   | 
margin.right | 
 Specifies the right margin of the plotting area in line units.
Default is   | 
theme | 
 Built-in layout options. Options include: ("none", "SAKK", "Lancet", "JCO", "WCLC", "ESMO")  | 
Details
The survSAKK R package provides the surv.plot() function, facilitating
Kaplan-Meier survival analysis. Designed with user-friendliness and efficiency
in mind. Offering robust tool for analysing survival data. It utilises the
functionalities of survival::survfit().
For a comprehensive manual visit: https://sakk-statistics.github.io/survSAKK/articles/surv.plot.html
Value
Kaplan-Meier curves of the input fit,
incorporating various statistics and layout option(s).
Author(s)
Vithersan Somasundaram and Katrin Gysel
References
Therneau T (2024). A Package for Survival Analysis in R. R package version 3.5-8, https://CRAN.R-project.org/package=survival.
Terry M. Therneau, Patricia M. Grambsch (2000). Modeling Survival Data: Extending the Cox Model. Springer, New York. ISBN 0-387-98784-3.
See Also
-  
survival::survfit()which this function wraps. 
Examples
 require(survival)
 require(survSAKK)
# Create survival object
 fit <- survfit(Surv(lung$time/365.25*12, status) ~ sex, data = lung)
# Generate survival plots
 surv.plot(fit = fit,
   time.unit = "month",
   legend.name =  c("male", "female"))