Learn R Programming

hero (version 0.6)

circulate: Circulate values of a vector

Description

The first n values of x are circulated from the front of x to the back of x.

Usage

circulate(x, n = 1)

Value

The circulated vector

Arguments

x

vector of values

n

The number of values to circulate

Author

Joshua French

Examples

Run this code
circulate(1:10, n = 2)
circulate(as.list(1:10), n = 2)

Run the code above in your browser using DataLab