Learn R Programming

ROCaggregator (version 1.0.1)

shift_vector: Shift a vector left or right according to the value provided

Description

Shift a vector left or right according to the value provided

Usage

shift_vector(x, n)

Arguments

x

the vector

n

shift

Value

the vector shifted

Examples

Run this code
# NOT RUN {
shift_vector(c(1,2,3,4), 1)
shift_vector(c(1,2,3,4), -1)
# }

Run the code above in your browser using DataLab