Skip to contents

Plot a risk score ordered by patient

Usage

plot_RiskScore(
  rs,
  event,
  legend.position = c(0.2, 0.8),
  palette = "house",
  color = NULL,
  font = "Arial"
)

Arguments

rs

Numeric risk scores. Names, when present, are used as patient identifiers.

event

Event indicator used to fill the bars.

legend.position

Legend position.

palette

Palette name passed to get_color().

color

Optional vector of fill colours; overrides palette.

font

Font family used in the plot.

Value

A ggplot object.

Examples

set.seed(1)
p <- plot_RiskScore(rnorm(30), rbinom(30, 1, 0.4))