ascat: Convert number to factor by inner breaks

View source: R/ascat.R

ascatR Documentation

Convert number to factor by inner breaks

Description

Convert number to factor by inner breaks

Usage

ascat(x, breaks, labels = NULL, include.lowest = TRUE)

Arguments

x

a numeric vector

breaks

a numeric vector of two or more unique cut points

labels

labels for the levels of the resulting category

Value

A factor is returned

Examples

ascat(1:10, 5) # eqaul cut(1:10, c(1, 5, 10), include.lowest = TRUE)
ascat(1:10, 5, c("less than or euqal to 5", "greater than 5"))

liubianshi/lbs documentation built on Nov. 2, 2023, 11:06 a.m.