Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/r-utility-shift.R
This function shifts vector elements to the left, filling the new last position with a specified value. 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 | shift.left(v, last = NA)
|
v |
a vector |
last |
a value to be inserted at the last position after shifting |
All vector elements are shifted to the left: the original v[1]
disappears, the original v[2]
becomes the new v[1]
,
etc. The new v[length(v)]
value is set to last
(defaulting to NA
).
The shifted version of v
.
Pawel Cichosz <p.cichosz@elka.pw.edu.pl>
1 | shift.left(1:10)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.