Description Usage Arguments Details Value See Also Examples
View source: R/categorizeByIntervals.R
Categorizes numeric values allowing for different types of intervals.
1 | categorizeByIntervals(v_n_values, ci_intervals)
|
v_n_values |
a numeric vector. Must have length of at least 1. |
ci_intervals |
a CategorizationIntervals object. See |
Flexibles intervals are allowed in ci_intervals for example '(-Inf,0), [0,0], (0,Inf)' is valid.
a vector with the same length as v_n_values with the same type as ci_intervals[['value']].
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | ci_intervals <- CategorizationIntervals(value = c(-1,0,1),
min = c(-Inf, 0, 0),
max = c(0 , 0, Inf),
close_left = c(0,1,0),
close_right = c(0,1,0) )
v_n_values <- -3:3
categorizeByIntervals(v_n_values, ci_intervals)
ci_intervals <- CategorizationIntervals(value = c(1,2,3),
v_s_intervals = c("(-Inf,0)","[0,0]","(0,Inf)"))
v_n_values <- -3:3
categorizeByIntervals(v_n_values, ci_intervals)
ci_intervals <- CategorizationIntervals(value = c("Neg","Zero","Pos"),
min = c(-Inf, 0, 0),
max = c(0 , 0, Inf),
close_left = c(0,1,0),
close_right = c(0,1,0) )
v_n_values <- -3:3
categorizeByIntervals(v_n_values, ci_intervals)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.