map: Map over vectors and lists

View source: R/map.R

mapR Documentation

Map over vectors and lists

Description

A small base-R-style mapping helper with no external dependency: apply .f to each element of .x and return the results in a list, like base::lapply() with a friendlier argument name.

Usage

map(.x, .f, ...)

Arguments

.x

A vector or list.

.f

A function or function name.

...

Additional arguments passed to .f.

Value

map() returns a list.

Examples

map(1:3, function(x) x + 1)

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