circshift {cellmigRation}R Documentation

Shift Array Circularly

Description

Circularly shift the elements in an array by a user-defined number of positions. This emulates the behavior of the corresponding Matlab Circhsift function.

Usage

circshift(x, n = 1)

Arguments

x

a character, numeric, or logical vector with at least n + 1 elements

n

an integer corresponding to the number of positions for the shift

Value

a vector corresponding to x (same size, same class), whose elements have been shifted

Author(s)

Damiano Fantini, damiano.fantini@gmail.com

References

https://www.data-pulse.com/dev_site/cellmigration/

Examples

cellmigRation:::circshift(seq(1,10,by=1), -2)


[Package cellmigRation version 1.0.0 Index]