extractCategoriesFromIntervals: Extract Categories from Interals

Description Usage Arguments Value See Also Examples

View source: R/CategorizationIntervals.R

Description

Parses a character vector of intervals to a data.table with numeric values

Usage

1
extractCategoriesFromIntervals(value, v_s_intervals)

Arguments

value

a vector.

v_s_intervals

a character vector. Each element must start with "[" or "(" and end with "]" or ")" and have two numeric values seperated by ",".

Value

data.table with columns value, min, max, close_left and close_right.

See Also

categorizeByIntervals, CategorizationIntervals

Examples

1
2
3
dt_intervals <- extractCategoriesFromIntervals(value = c(1,2,3),
                                        v_s_intervals = c("(-Inf,0)","[0,0]","(0,Inf)"))
print(dt_intervals)

AlejandroKantor/akmisc documentation built on May 5, 2019, 3:51 a.m.