| equifreq {lfl} | R Documentation |
Return equifrequent breaks
Description
If both left and right equal to "none", the function returns a vector of n values from x
that divide the range of values in x into n - 1 equidistant intervals. If the left (resp. right)
argument equals to "infinity", -Inf (resp. Inf) is prepended (resp. appended) to the result. If
it equals to "same", the first (resp. last) value is doubled. See fcut() for what such vectors
mean.
Usage
equifreq(
x,
n,
left = c("infinity", "same", "none"),
right = c("infinity", "same", "none")
)
Arguments
x |
A numeric vector of input values |
n |
The number of breaks of |
left |
The left border of the returned vector of breaks: |
right |
The right border of the returned vector of breaks: |
Details
If the left (resp. right) argument equals to "infinity", -Inf (resp. Inf) is prepended
(resp. appended) to the result. If it equals to "same", the first (resp. last) value is doubled.
Such functionality is beneficial if using the result of this function with e.g. the fcut() function:
Inf values at the beginning (resp. at the end) of the vector of breaks means that the fuzzy set
partition starts with a fuzzy set with kernel going to negative (resp. positive) infinity; the doubled
value at the beginning (resp. end) results in half-cut (trimmed) fuzzy set.
Value
A vector of equifrequent breaks
Author(s)
Michal Burda