Learn R Programming

rmngb (version 0.6-1)

zipLists: Combination of Lists

Description

Makes a list of length n lists, each length n list containing elements of the n input lists occuring at the same position.

Usage

zipLists(...)

Arguments

...
lists.

Value

A list of length n lists, each length n list containing elements of the n input lists occuring at the same position. This list is as long as the longest element from ....

Details

If any elements of ... are too short, their elements are recycled to the length of the longest, unless any have length zero.

See Also

mapply.

Examples

Run this code
l1 <- list(a = 1:3, b = 4:5)
l2 <- list(x = letters[1:2], y = letters[5:7])
l3 <- list(1)

zipLists(l1, l2, l3)

Run the code above in your browser using DataLab