add_perc: add_perc

Description Usage Arguments Value Examples

Description

adds percentage distribution columns to a summarised data frame

Usage

1
add_perc(data, start_col)

Arguments

data

A data frame that has a date or similar variable as its first column, followed by the levels of some categorical variable that makes up a total, which is the last column. Typically a data frame created by the vardistr_amnt function. @param start_col start start summing across from this column number

Value

the same data frame plus a column starting with "perc" for each of the existing variables. These added variables will add up to 100 are summed up row wise.

Examples

1
x <- add_perc(df_vda, 2)

TheProfitTable/loanportr documentation built on May 28, 2019, 3:17 p.m.