Last chance! 50% off unlimited learning
Sale ends in
Closest(x, a, which = FALSE, na.rm = FALSE)
which
set.seed(8)
x <- sample(10, size=10, replace=TRUE)
Closest(x, 6)
Closest(x, 6, which=TRUE)
Closest(c(2, 3, 4, 5), 3.5)
Run the code above in your browser using DataLab