cutVar: Cuts numeric variable into groups

Description Usage Arguments Examples

View source: R/cutVar.R

Description

Builds on base cut function

Usage

1
cutVar(x, breaks, midpoints, labels = NULL, dp = 2, ...)

Arguments

x

Vector of numeric.

breaks

Integer. Number of groups to create.

midpoints

Logical. Return midpoint of groups, rather than character?

dp

Integer. Number of decimal places if midpoints == TRUE.

Examples

1
2
3
4
5
vec <- c(-10, mtcars$mpg)

cutVar(vec, breaks = 3)

cutVar(vec, breaks = 3, midpoints = TRUE)

Braja93/braja documentation built on June 1, 2017, 5:19 p.m.