breakdown: Breakdown values of a variable by the number of people who...

Description Usage Arguments

View source: R/breakdown.R

Description

Breakdown values of a variable by the number of people who have that value or a higher value.

Usage

1
breakdown(df, variable, breakdowns)

Arguments

df

dataframe. The dataframe to analyze.

variable

character. The value to breakdown.

breakdowns

integer. A vector of values to breakdown. Usually produced by seq(), but could be a vector.

e.g., breakdown(data, 'age', seq(5, 90, by = 5)) will tell me how many people are age 5 or older, how many people are age 10 or older, how many people are age 15 or older, etc. to age 90.


peterhurford/surveytools2 documentation built on Feb. 18, 2021, 9:13 p.m.