categorise: Convert numeric variable into categorical variable

View source: R/categorise.R

categoriseR Documentation

Convert numeric variable into categorical variable

Description

This is a wrapper around the cut() function.

Usage

categorise(x, breaks)

Arguments

x

A numeric vector to be passed through.

breaks

Break points for the categories. Both the top and bottom breaks must be provided.

Value

Returns a character vector.

Examples

categorise(seq(10),breaks=c(0,3,10))

martinctc/surveytools documentation built on Nov. 21, 2024, 10:48 p.m.