waterfall: Waterfall plot coloured by discrete categories

Description Usage Arguments Details Value Author(s) Examples

View source: R/waterfall.R

Description

Generates a waterfall plot, which summarises the distribution of a continuous variable (such as a quantitative trait) by discrete categories (such as genotype).

Usage

1
2
3
4
## S3 method for class 'character'
waterfall(object, x, data, ylab, ylim, bylevel, col, ...)
## S3 method for class 'numeric'
waterfall(object, x, data, ylab, ylim, bylevel, col, ...)

Arguments

object

The name or values of the continuous variable

x

The name or values of the discrete category variable

data

A data frame containing values

ylab

A label for the y axis

ylim

Limits for the y axis

bylevel

Whether to group subjects by levels of x

col

A vector of colours

...

Other arguments

Details

Waterfall plots are widely used in clinical oncology, to display the distribution of a specific quantitative trait: best on-study change in tumour burden, relative to baseline. The plot is typically coloured by levels of a factor, such as treatment arm or categorical best response. In principle the plot could be used for any quantitative trait, but the display is most visually appealing when the trait takes both positive and negative values.

Value

Returns an invisible null. The plot is generated as a side effect.

Author(s)

Toby Johnson Toby.x.Johnson@gsk.com

Examples

1
2
3
4
data(aoex1)
par(mfrow = c(1, 2))
with(aoex1, waterfall(bmi-mean(bmi, na.rm = TRUE), rs123456, bylevel = TRUE))
with(aoex1, waterfall(bmi-mean(bmi, na.rm = TRUE), rs123456, bylevel = FALSE))

tobyjohnson/gtx documentation built on Aug. 30, 2019, 8:07 p.m.