lzip: Takes a list of lists, and combines the corresponding...

View source: R/ListUtil.r

lzipR Documentation

Takes a list of lists, and combines the corresponding elements of each list into a result list of lists. The first list of the result contain the first elements of the source lists, the second list of the result contains the second elements of the sources lists, and so on.

Description

eg: str(lol) List of 2 $ A:List of 3 ..$ A1: chr "a1" ..$ A2: chr "a2" ..$ A3: chr "a3" $ B:List of 3 ..$ B1: chr "b1" ..$ B2: chr "b2" ..$ B3: chr "b3"

Usage

lzip(lol)

Arguments

lol

list of lists. Each inner list should have the same number of elements

Details

The result of zip is:

List of 3 $ A1:List of 2 ..$ A: chr "a1" ..$ B: chr "b1" $ A2:List of 2 ..$ A: chr "a2" ..$ B: chr "b2" $ A3:List of 2 ..$ A: chr "a3" ..$ B: chr "b3"

zip is the same as the Lisp operation zip:

(zip '(a1 a2 a3) '(b1 b2 b3) => ((a1 b1) (a2 b2) (a3 b3))

Value

the corresponding elements of lol combined


kcha193/simarioV2 documentation built on April 8, 2024, 4:51 p.m.