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

recycle_vectors

Recycle List of Vectors to Common Length


Description

Repeats all vectors of a list .x to the length of the longest vector using rep() with argument length.out. This operation will only work if the length of the longest vectors is an integer multiple of all shorter vectors, and will throw an exception otherwise.

Usage

recycle_vectors(.x)

Arguments

.x

(list()).

Value

(list()) with vectors of same size.

Examples

recycle_vectors(list(a = 1:3, b = 2))

mlr3misc

Helper Functions for 'mlr3'

v0.10.0
LGPL-3
Authors
Michel Lang [cre, aut] (<https://orcid.org/0000-0001-9754-0393>), Patrick Schratz [aut] (<https://orcid.org/0000-0003-0748-6624>)
Initial release

We don't support your browser anymore

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