cut.integer: Convert integer vector to Factor

Description Usage Arguments Value Examples

View source: R/cut.integer.R

Description

S3-method for cut applied to integer vectors where all outcome factors are integer intervals.

Usage

1
2
## S3 method for class 'integer'
cut(x, ...)

Arguments

x

integer vector

...

further arguments passed to or from other methods

Value

If cut.default(x, ...) returns only integer intervals, these are formatted in a more natural way and returned as an ordered factor. If non integer interval limits occur, the output of cut.default(x, ...) is returned as is.

Examples

1
2
3
cut.default(1:100, seq(0, 100, 20)) # Gives a quite unnatural output
cut(1:100, seq(0, 100, 20)) # Gives nicer and ordered output
cut(1:10, 3) # no integer intervals and therefor same as cut.default

incadata documentation built on April 14, 2020, 6:08 p.m.