Learn R Programming

survMisc (version 0.4.6)

autoplot.tableAndPlot: Arrange and plot a survival plot, it's legend and a table.

Description

Uses gridExtra::gridArrange to arrange a plot, it's legend and a table.

Usage

## S3 method for class 'tableAndPlot':
autoplot(object, ..., hideTabLeg = TRUE,
  plotHeight = 0.75, tabHeight = 0.25)

Arguments

object
An object of class tableAndPlot, as returned by autoplot.survfit
...
Additional arguments (not implemented)
hideTabLeg
Hide table legend. If supTabLeg = TRUE (the default), the table legend will not appear.
plotHeight
Plot height.
tabHeight
Table height.

Value

  • A graph, as plotted by gridExtra::grid.arrange

Details

Arguments to plotHeigth and tabHeight are best specified as fractions adding to $1$, e.g. $0.85 + 0.15 =1$.

Examples

Run this code
data(kidney, package="KMsurv")
a1 <- autoplot(survfit(Surv(time, delta) ~ type, data=kidney), type="fill")
autoplot(a1)
a1 <- autoplot(survfit(Surv(time, delta) ~ type, data=kidney), type="fill")
data(bmt, package="KMsurv")
s2 <- survfit(Surv(time=t2, event=d3) ~ group, data=bmt)
autoplot(autoplot(s2))

Run the code above in your browser using DataLab