zip.tuple: Combine 2 lists into a list of lists

Description Usage Arguments Examples

Description

Return a list of 2 item lists, where each list contains the i-th element from each of the argument sequences. The returned list is truncated in length to the length of the shortest argument sequence.

Usage

1
  zip.tuple(x, y)

Arguments

x

a list, vector, or list.py

y

a second list, vector, or list.py

Examples

1
2
3
4
5
6
7
x <- list.py(1, 2, 3)
y <- list.py(4, 5, 6)
zip.tuple(x, y)
#[[1, 4], [2, 5], [3, 6]]
y <- list.py("a", "b", "c")
zip.tuple(x, y)
#[[1, 'a'], [2, 'b'], [3, 'c']]

yhat/structr documentation built on May 4, 2019, 2:33 p.m.