bin_binary: Bin data in a binary fashion.

Description Usage Arguments Value

Description

Adds a "bin" column to a dataframe or related data strucutre which indicates whether or not another column meets a given threshold.

Usage

1
2
bin_binary(data, by, threshold, levels = c("Acceptable", "Not Acceptable"),
  reverse = FALSE)

Arguments

data

The dataframe or related data structure containing the data.

by

The column that we will evaluate against the threshold. Pass as string.

threshold

The value we evaluate our "by" column with.

levels

The values that will be used to fill the "bin" column.

reverse

logical; Should values below or equal to the threshold be considered good?

Value

The same dataframe, but with an additional column indicating the bins our data falls into.


tbadams45/wrviz documentation built on May 31, 2019, 3:58 a.m.