medianDiff {robcp} | R Documentation |
Median of the set X - Y
Description
Computes the median of the set X - Y. X - Y denotes the set \{x - y | x \in X, y \in Y
}.
Usage
medianDiff(x, y)
Arguments
x , y |
Numeric vectors |
Details
Special case of the function kthPair
.
Value
The median element of X - Y
Author(s)
Sheila Görz
References
Johnson, D. B., & Mizoguchi, T. (1978). Selecting the K-th Element in X+Y and X_1+X_2+ ... +X_m. SIAM Journal on Computing, 7(2), 147-153.
Examples
x <- rnorm(100)
y <- runif(100)
medianDiff(x, y)
[Package robcp version 0.3.9 Index]