Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/r-utility-closest.R
This function finds in an input numeric vector the closest (least) value above a specified threshold. It is used in examples presented in the book Cichosz, P. (2015): Data Mining Algorithms: Explained Using R. See Appendix B or http://www.wiley.com/go/data_mining_algorithms for more details.
1 | closest.above(v1, v2)
|
v1 |
a numeric vector of threshold values |
v2 |
a numeric vector of input value |
For each threshold value in v1
, the least greater input value
from v2
is found and returned.
A numeric vector of the same length as v1
, containing for
each element of v1
the least greater value from v2
or
Inf
if no such value exists.
Pawel Cichosz <p.cichosz@elka.pw.edu.pl>
1 2 3 | closest.above(1:5, 1:10)
closest.above(6:10, 1:10)
closest.above(2*(1:4), 1:10)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.