Recycle arguments

Share:

Description

Explicit recycling of arguments to make them all have the same length.

Usage

1

Arguments

...

Arguments, usually vectors.

Value

A list of vectors, all with the same length.

Note

The function is based on rep_len, which drops attributes (hence this being most appropriate for vector inputs).

See Also

rep_len.

Examples

1
2
3
4
5
## 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)