ggplot.tidysurv: Ggplot method for tidysurv objects

Description Usage Arguments Value

Description

Ggplot method for tidysurv objects

Usage

1
2
3
## S3 method for class 'tidysurv'
ggplot(data, mapping = NULL, type = "cumulative", ...,
  environment = parent.frame())

Arguments

data

A tidysurv object

mapping

An aesthetic mapping for ggplot, created by one of the aes functions.

type

What type of plot? Cumulative/survival, or rate? If the latter, need to have set time_period in tidysurv.

...

Further arguments to be passed to ggplot

environment

See ?ggplot2::ggplot

Value

A ggplot object without any layers, but with sensible defaults for aesthetic mappings: each distinct predictor in a group (with distinct colors), and (if a competing risk model) each state in a separate group (with distinct line-types).


jwdink/tidysurv documentation built on May 20, 2019, 6:24 a.m.