Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

vec_repeat

Expand the length of a vector


Description

[Deprecated]

vec_repeat() has been replaced with vec_rep() and vec_rep_each() and is deprecated as of vctrs 0.3.0.

Usage

vec_repeat(x, each = 1L, times = 1L)

Arguments

x

A vector.

each

Number of times to repeat each element of x.

times

Number of times to repeat the whole vector of x.

Value

A vector the same type as x with size vec_size(x) * times * each.


vctrs

Vector Helpers

v0.3.8
MIT + file LICENSE
Authors
Hadley Wickham [aut], Lionel Henry [aut, cre], Davis Vaughan [aut], data.table team [cph] (Radix sort based on data.table's forder() and their contribution to R's order()), RStudio [cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.