bin_integer_fct: Bin integer levels in a factor

View source: R/factor.R

bin_integer_fctR Documentation

Bin integer levels in a factor

Description

Input is a vector with levels that, all except one, are naturally integers e.g. "60". The other level is a string e.g. "missing". An ordered factor is returned with the "integer" levels grouped into bins based on the argument cuts with appropriate names.

Usage

bin_integer_fct(ff, cuts)

Arguments

ff

Factor vector to be binned.

cuts

A numeric vector giving bin cuts. Don't add -Inf or Inf end cuts as these are handled automatically.

Details

FACTOR ORDERING HAS NOT BEEN CHECKED.


jedwards24/edwards documentation built on Sept. 2, 2023, 8:16 a.m.