median_range() computes the minimal and maximal possible
median values. This is helpful if median2() returns NA: the median
can't be determined, but at least its bounds might be known.
Arguments
- x
Numeric or similar. Vector to search for its possible medians.
- na.rm.amount, even
Passed on to
median2().
Value
Vector of length 2 and the same type as x.
If the median can be determined (i.e., median2() would return a
non-NA value), median_range() returns two identical values.
If there are missing values at the median position, the median range cannot
be determined. The function will then return c(NA, NA).
Details
Like median2(), this function is generic, so methods can be
defined for other classes. This documentation describes the default method.