rep_each: Replicate elements of vector

View source: R/seq.R

rep_eachR Documentation

Replicate elements of vector

Description

This is a slight modification of rep in basic package. It replicates each element of a vector one by one to construct a new vector.

Usage

rep_each(x, times = 2)

Arguments

x

a vector

times

the number of replication times of each element.

See Also

seq_approximate,

Examples

rep(1:10, 2)
rep_each(1:10, 2)

caesar0301/movr documentation built on June 18, 2022, 2:37 a.m.