get_vector_cutpoints: Get the cutpoints from a single factor vector.

Description Usage Arguments Details Value See Also Examples

Description

get_vector_cutpoints returns a numeric vector giving the unique cutpoints of a variable that has been discretized using vector_bin- more generally, using cut and any functions that depend on cut

Usage

1

Arguments

v

vector to get cutpoints from

Details

This function is provided for convienience, and is built to work with the exact format for discretized variables that is used by the cut family. Hence it will work for cut, cut_number/cut_interval, and any of the binning functions from modellingTools, but it is not guaranteed to work for arbitrary factors with numeric levels

Value

a vector containing the unique cutpoints in v

See Also

cut, cut_number, cut_interval, vector_bin

Other discretization: binned_data_cutpoints, simple_bin, vector_bin

Examples

1
2
x <- cut(rnorm(100),c(-1,0,1))
get_vector_cutpoints(x) # -1, 0, 1

awstringer/modellingTools documentation built on May 11, 2019, 4:11 p.m.