If you are building a histogram of binned values, you want to have labels for your bins that correspond to the ranges you used to bin. This function takes the breakpoints that define your bins and produces nice-looking labels for your histogram plot.

labelCuts(
  breakPoints,
  round_digits = 1,
  signif_digits = 3,
  collapse = "-",
  infBins = FALSE
)

Arguments

breakPoints

The exact values you want as boundaries for your bins

round_digits

Number of digits to cut round labels to.

signif_digits

Number of significant digits to specify.

collapse

Character to separate the labels

infBins

use >/< as labels on the edge bins

Value

A vector of histogram axis labels.

Details

labelCuts will take a cut group, (e.g., a quantile division of some signal), and give you clean labels (similar to the cut method).