Construct a ks_fmap-classed named character vector whose names
encode numeric / Date / POSIXct range bounds and whose values are the
corresponding labels. The result is intended to be passed to
fnew as a single positional argument (it suppresses the
default name reversal).
Arguments
- low, high
Numeric,
Date, orPOSIXctvectors of equal length giving the lower / upper bounds of each range.- label
Character vector of labels (same length as
low).- inc_low, inc_high
Logical, length 1 or
length(low). Whether each bound is inclusive. Defaults matchrange_spec:[low, high).- date_format
Optional strptime format string used when formatting
Date/POSIXctbounds into key strings.
Value
A ks_fmap object (named character vector) suitable for
passing to fnew().
Details
Bounds are formatted as ISO 8601: "%Y-%m-%d" for Date,
"%Y-%m-%d %H:%M:%S" (UTC) for POSIXct. Override with
date_format if needed.