ggpyramid: Age pyramid using ggplot2

Description Usage Arguments Author(s) Examples

Description

This is where you put your description. Bla bla bla. Lines should not be more than 80 characters.

Usage

1
2
3
ggpyramid(data, age, sex, males = stringr::regex("1|^m.*", ignore_case =
  TRUE), females = stringr::regex("2|^f.*", ignore_case = TRUE),
  x_breaks, make_age_cat = TRUE)

Arguments

data

A data.frame.

age

...

sex

...

males

...

females

...

x_breaks

...

make_age_cat

...

Author(s)

Jonathan Polonsky polonskyj@who.int.

Examples

1
2
3
4
age <- rgeom(1000, .1)
sex <- sample(c("male", "female"), 1000, replace = TRUE)
df <- data.frame(age, sex)
ggpyramid(df, age = age, sex = sex, x_breaks = 50)

reconhub/ggpyramid documentation built on May 16, 2019, 8:10 p.m.