circshift: Shift Array Circularly

Description Usage Arguments Value Author(s) References Examples

View source: R/all_functions_v8.R

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

1
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

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

ocbe-uio/CellMigRation documentation built on Dec. 26, 2021, 10:19 p.m.