Description Usage Arguments Details Value See Also Examples
View source: R/CategorizationIntervals.R
Construction function for CategorizationIntervals class used in categorizeByIntervals
.
1 2 |
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 ",". Default NULL. |
min |
a numeric vector. Default NULL. |
max |
a numeric vector. Default NULL. |
close_left |
a integer vector with only values 0 or 1 or a logical vector. Default NULL. |
close_right |
a integer vector with only values 0 or 1 or a logical vector. Default NULL. |
i_digits_label |
number of digits in label created as part of the object. Default is 3. |
Intervals are not allowed to overlap. Either v_s_intervals is provided or min, max, close_left and close_right must be provided. CategorizationIntervals class inherits from data.table. This object type is used in categorizeByIntervals
.
a CategorizationIntervals object.
1 2 3 4 5 6 7 8 9 10 | library(data.table)
ci_intervals <- CategorizationIntervals(value = c(1,2,3),
min = c(-Inf, 0, 0),
max = c(0 , 0, Inf),
close_left = c(0,1,0),
close_right = c(0,1,0) )
print(ci_intervals)
ci_intervals <- CategorizationIntervals(value = c(1,2,3),
v_s_intervals = c("(-Inf,0)","[0,0]","(0,Inf)"))
print(ci_intervals)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.