calc_bins: Generate bins for continous variables

Description Usage Arguments Value Examples

View source: R/helper_functions.R

Description

This function calculates outliers for any given metric

Usage

1
2
calc_bins(df, metric, bin.threshold = 4, min.bins = 3, max.bins = 8,
  bin.cutoff = 0.055)

Arguments

df

A dataframe containing metric values

metric

The column name of the metric of interest

bin.threshold

The min number of bins that needs to be met in order to calculate bins up to max.bins

min.bins

The min number of bins

max.bins

The max number of bins

bin.cutoff

Combines bins together where the percent of values contained is less than the cutoff

Value

A list object containing the input df with outliers removed, and the outlier values

Examples

1
calc_bins(df, 'spend')

cchoe/infoscout documentation built on May 20, 2019, 5:42 p.m.