applyCut {arc}R Documentation

Apply Cut Points to Vector

Description

Applies cut points to vector.

Usage

applyCut(col, cuts, infinite_bounds, labels)

Arguments

col

input vector with data.

cuts

vector with cutpoints. There are several special values defined: NULL indicates that no discretization will be performed, but the value will be converted to factor "All" indicates all values will be merged into one.

infinite_bounds

a logical indicating how the bounds on the extremes should look like. If set to FALSE, the leftmost/rightmost intervals will be bounded by the minimum and maximum in the respective column. If set to TRUE, the leftmost/rightmost intervals will be bounded by negative and positive infinity.

labels

a logical indicating whether the bins of the discretized data should be represented by integer codes or as interval notation using (a;b] when set to TRUE.

Value

Vector with discretized data.

See Also

applyCuts

Examples

  applyCut(datasets::iris[[1]], c(3,6), TRUE, TRUE)

[Package arc version 1.4 Index]