Skip to contents

A thin wrapper around Hmisc::cut2 which relabels the output labels using a format string

Usage

cut_pretty_labels(
  x,
  fmt = "%s-%s",
  last_value_gte = TRUE,
  big_mark = ",",
  ...
)

Arguments

x

A numeric vector to bin using cut2

fmt

A string interpretable by sprintf formatting the breaks

last_value_gte

(boolean, default: TRUE) If TRUE, will output last level with ">=number" notation

big_mark

(default: ,) A big mark separator for number formatting or NULL for none

...

additional parameters passed thru to cut2