Format age categories

age_categories() group_age_categories()

Create an age group variable

Calculate proportions

Use these functions to calculate tables of proportions using binom::binom.wilson()

attack_rate() case_fatality_rate() case_fatality_rate_df() mortality_rate()

Rates and Ratios

Format proportions and confidence intervals inline

Use these functions to produce inline text in Rmarkdown documents

fmt_ci() fmt_pci() fmt_pci_df() fmt_ci_df()

Helper to format confidence interval for text

fmt_count()

Counts and proportions inline

Generate breaks for grouping or color scales

find_breaks()

Automatically calculate breaks for a number

Generate population counts

gen_population()

Generate population counts from estimated population age breakdowns.

Find first date/cause of an event beyond a cutoff over several columns

Use these functions to find what event occured first and when (e.g. died, lost to follow-up, survived)

find_date_cause() find_start_date() find_end_date() constrain_dates() assert_positive_timespan()

Find the first date beyond a cutoff in several columns

Add population weights to complex survey design data

add_weights_strata()

Add a column of stratified survey weights to a data frame. For use in surveys where you took a sample population out of a larger source population, with a simple-random or stratified survey design.

add_weights_cluster()

Add a column of cluster survey weights to a data frame.

Plot z-curves to compare anthropometric indicators to WHO standards

zcurve()

Create a curve comparing observed Z-scores to the WHO standard.

Modify column names

rename_redundant() augment_redundant()

Cosmetically relabel all columns that contains a certain pattern

unite_ci() merge_ci_df() merge_pci_df()

Unite estimates and confidence intervals

Miscellaneous

fac_from_num()

create factors from numbers

gen_polygon()

Fake spatial data as polygons This function returns a polygon which is split in to regions based on a supplied vector of names