stitch: Simple function to pair up the elements of two or more...

Description Usage Arguments Value Examples

View source: R/stitch.R

Description

Simple function to pair up the elements of two or more equal-length lists. Function works similar to zip in python.

Usage

1
stitch(list1, ...)

Arguments

list1

A list.

...

More lists of the same length.

Value

A list of the same length as the original lists. Each element of the list is itself a list, containing two elements: the corresponding element of the first list, and the corresponding element of the second list. The function should will also work with vectors of equal length.

Examples

1
2
3
listA = list(1,2,3,4)
listB = list("A","B","C","D")
stitch(listA,listB)

danwkenn/SimAdmixtR documentation built on May 30, 2020, 7:25 a.m.