traverse: Traverse a list of arguments

View source: R/map.R

traverseR Documentation

Traverse a list of arguments

Description

Call .f once per position across several equal-length vectors or lists, passing the i-th element of each as a positional argument. The parallel-map companion to map().

Usage

traverse(.l, .f, ...)

Arguments

.l

A list of vectors or lists with a common length.

.f

A function or function name.

...

Additional arguments passed to .f.

Value

traverse() returns a list.

Examples

traverse(list(a = 1:2, b = 10:11), function(a, b) a + b)

basetable documentation built on Sept. 18, 2026, 9:13 a.m.