rot: Rotate values

Description Usage Arguments Value Author(s) Examples

Description

Rotate a vector of values, starting from (1:N), (2:N,1), (3:N,1,2), (4:N,1:3), ...

Usage

1
rot(x, start.idx)

Arguments

x

a vector of values

start.idx

the index of the new first element in x

Value

a vector same length and type as x

Author(s)

Mark Cowley 2008-05-13

Examples

1
2
3
rot(LETTERS[1:5],1)
rot(LETTERS[1:5],3)
rot(LETTERS[1:5],5)

drmjc/mjcbase documentation built on May 15, 2019, 2:27 p.m.