recycle {assertive.strings} | R Documentation |
Explicit recycling of arguments to make them all have the same length.
recycle(...)
... |
Arguments, usually vectors. |
A list
of vectors, all with the same length.
The function is based on rep_len
, which drops attributes (hence
this being most appropriate for vector inputs).
## Not run: # z is the longest argument, with 6 elements recycle(x = 1:4, y = list(a = month.abb, b = pi), z = matrix(1:6, nrow = 3)) ## End(Not run)