rotate: rotate

Description Usage Arguments Value Examples

View source: R/rotate.R

Description

rotate a vector by given number of positions forward or backwards

Usage

1
rotate(vec, by = 1L)

Arguments

vec

A vector

by

An integer indicating number of positions. Default is 1L

Value

A vector after rotating it

Examples

1
2
rotate(1:10, 2)
rotate(letters, -5)

talegari/sidekicks documentation built on Sept. 26, 2018, 4:18 p.m.