shift: Shift function

Description Usage Arguments Details Value Author(s) Examples

Description

This function shifts a vector input a certain number of places in the direction desired.

Usage

1
shift(v, places, dir = "right")

Arguments

v

a vector of input values.

places

the number of places to shift v.

dir

The direction to shift v.

Details

The function shifts the vector v by places in the direction of direction, using wrapping at the boundaries. Used for cycle spinning.

Value

vnew

the shifted version of v.

Author(s)

Matt Nunes ([email protected])

Examples

1
2
3
4
5
6
7
8
9
v<-runif(10)

#have a look at v:

v

#now shift the values 4 places to the right...

shift(v,4,dir="right")

binhf documentation built on May 30, 2017, 12:16 a.m.

Related to shift in binhf...