Learn R Programming

simplevis (version 4.5.0)

bin_cuts_to_interval_labels: Convert bin cuts to interval legend labels.

Description

Convert bin cuts to interval legend labels.

Usage

bin_cuts_to_interval_labels(bin_cuts, label_digits = NULL, right_closed = TRUE)

Arguments

bin_cuts

A numeric vector of bin cuts from which to create a vector of legend labels.

label_digits

The number of decimal places to round labels to.

right_closed

TRUE or FALSE of whether bins or quantiles are to be cut right-closed. Defaults to TRUE.

Value

A vector of labels.

Examples

Run this code
# NOT RUN {
bin_cuts_to_interval_labels(c(0, 0.1, 3, 4.1, 7, 100, Inf))
# }

Run the code above in your browser using DataLab