A re-export of vctrs::vec_recycle
as an S7 generic
function to allow S4Vectors
.
Arguments
- x
A vector to recycle.
- size
Desired output size.
- ...
Depending on the function used:
For
vec_recycle_common()
, vectors to recycle.For
vec_recycle()
, these dots should be empty.
- x_arg
Argument name for
x
. These are used in error messages to inform the user about which argument has an incompatible size.- call
The execution environment of a currently running function, e.g.
caller_env()
. The function will be mentioned in error messages as the source of the error. See thecall
argument ofabort()
for more information.
Examples
vec_recycle(1L, size = 5L)
#> [1] 1 1 1 1 1
vec_recycle(S4Vectors::Rle(1L), size = 5L)
#> integer-Rle of length 5 with 1 run
#> Lengths: 5
#> Values : 1