bin_quantity_labeled: Creates a vector of human readable bins based by specifying...

View source: R/string_tools.R

bin_quantity_labeledR Documentation

Creates a vector of human readable bins based by specifying the number of bins in advance

Description

Creates a vector of human readable bins based by specifying the number of bins in advance

Usage

bin_quantity_labeled(values, qty_bins, boundary = 0, FUN, ...)

Arguments

values

The vector/column of values you want to bin

qty_bins

The number of ntiles you want to have

FUN

The function you want to use to apply formatting

...

The parameters you'd want to pass on to the formatting function supplied to FUN

Value

Ordered factor

Examples

bin_quantity_labeled(values = mtcars$mpg, qty_ntiles = 4, FUN = format_currency, currency = "GBP")

mark-me/graydon.package documentation built on Nov. 14, 2023, 5:31 p.m.