shift: Shift a vector cyclically

Description Usage Arguments Value

View source: R/util.R

Description

Shift a vector cyclically

Usage

1
shift(x, n = 0)

Arguments

x

- the vector to shift

n

- the number of places to shift (can be negative)

Value

A vector of the same size as x, shifted cyclically by n places (e.g. (1,2,3) shifted by n = 1 is (2,3,1))


Blaza/ssoftveR documentation built on May 6, 2019, 11:19 a.m.