Description Usage Arguments Value Author(s) Examples
View source: R/discretization.R
Given a list of previously computed ranges for a random variable, this function returns the index of the range the given value belongs to (i.e., in which bucket it belongs). The indexes start R-typically at 1. Per definition, a value is within a range, if it is larger than the range's minimum and less than or equal to its maximum.
1 | getRangeForDiscretizedValue(ranges, value)
|
ranges |
list of ranges, as obtained by @seealso |
value |
numeric a value drawn from the previously discretized random variable. |
integer the index of the range the given value falls into.
Sebastian Hönel sebastian.honel@lnu.se
1 2 3 4 5 | buckets <- mmb::discretizeVariableToRanges(
data = iris$Sepal.Length, openEndRanges = TRUE)
mmb::getRangeForDiscretizedValue(
ranges = buckets, value = mean(iris$Sepal.Length))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.