calc_pcts: Calculates Percentages

Description Usage Arguments Examples

View source: R/calc_pcts.R

Description

This function takes a dataframe and a list of columns to find a percentage for, along with a single column to use in the denominator. It returns a dataframe

Usage

1
calc_pcts(df, numerator_cols, denom_col)

Arguments

df

Dataframe. Used first to be friendly to the %>% operator.

numerator_cols

A character vector of columns to be used in the numerator.

denom_col

A single string of the column name to be used in the denominator.

Examples

1
2
3
4
## Not run: 
calc_pcts(system_level, c('on_track', 'mastered'), 'valid_tests')

## End(Not run)

amarsee/andrewacct documentation built on Feb. 19, 2020, 4:28 a.m.