shift.right: Shift vector elements to the right

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/r-utility-shift.R

Description

This function shifts vector elements to the right, filling the new first 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.

Usage

1
shift.right(v, first = NA)

Arguments

v

a vector

first

a value to be inserted at the first position after shifting

Details

All vector elements are shifted to the right: the original v[length(v)] disappears, the original v[length(v)-1] becomes the new v[length(v)], etc. The new v[1] value is set to first (defaulting to NA).

Value

The shifted version of v.

Author(s)

Pawel Cichosz <p.cichosz@elka.pw.edu.pl>

See Also

shift.left

Examples

1

42n4/dmr.util documentation built on May 20, 2019, 2:02 p.m.