butterfly: Make a butterfly plot

Description Usage Arguments Details Value Examples

View source: R/butterfly.R

Description

Makes Butterfly Density Plots

Usage

1
2
3
4
5
6
7
8
butterfly(
  sex,
  age,
  title = NULL,
  infoHeight = 10,
  infoWidth = 0.037,
  ageLimit = 85
)

Arguments

sex

Sex 1 = Male, 2 = Female

age

Age at diagnosis

title

Plot title

infoHeight

Position (the center) of summary statistics (use age units)

infoWidth

Position (the center) of summarry statistics (use density units)

ageLimit

Where to crop the top of age distribution (85 or 110 years)

Details

See the README on GitHub

Value

ggplot

Examples

1
2
3
butterfly(malesFemales1910$sex, malesFemales1910$age, "Census 1910")
butterfly(malesFemales2010$sex, malesFemales2010$age, "Census 2010", 
          infoHeight = 25, ageLimit = 110)

RaymondBalise/butterfly documentation built on Dec. 27, 2019, 2:16 a.m.