recycle2: variation of recycle that recycles one vector x or y to the...

View source: R/utils.r

recycle2R Documentation

variation of recycle that recycles one vector x or y to the length of the longer one

Description

variation of recycle that recycles one vector x or y to the length of the longer one

Usage

recycle2(x, y, na.fill = FALSE)

Arguments

x

vector to be recycled if shorter than y

y

vector to be recycled if shorter than x

na.fill

Use NAs for filling up to given length (default=FALSE)

Value

list a list containing the recycled x vector as first and the recycled y vector as second element

Examples

recycle2(1:10, 1:3)
recycle2(1, 1:5)
recycle2(1, 1:5, na.fill = TRUE)
recycle2(1:5, 5:1) # vectors unchanged

markheckmann/OpenRepGrid documentation built on April 14, 2024, 8:15 a.m.