cutVar: Cuts numeric variable into groups

Description Usage Arguments Examples

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 May 6, 2019, 12:07 a.m.