Description Usage Arguments Details Value Author(s) Examples
View source: R/r-utility-insert-ord.R
This function inserts a new value to an ordered vector with preserving the existing order. 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 | insert.ord(v, v1, decreasing = FALSE)
|
v |
an ordered numeric or character vector |
v1 |
a numeric value or a character string |
decreasing |
a flag indicating whether |
The new value v1
is inserted into v
in such a way
that the ordering of v
is preserved.
A copy of v
with v1
inserted at the appropriate
order-preserving position.
Pawel Cichosz <p.cichosz@elka.pw.edu.pl>
1 2 3 4 | insert.ord(1:10, 3.5)
insert.ord(10:1, 3.5, decreasing=TRUE)
insert.ord(1:10, 0)
insert.ord(1:10, 11)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.