nlapply: 'lapply' with named outputs

Description Usage Arguments

Description

This is equivalent to sapply(x, f, simplify = FALSE, USE.NAMES = TRUE).

Usage

1
nlapply(X, FUN, ..., name_transform = NULL)

Arguments

X

a vector (atomic or list) or an expression object. Other objects (including classed objects) will be coerced by base::as.list.

FUN

the function to be applied to each element of X: see ‘Details’. In the case of functions like +, %*%, the function name must be backquoted or quoted.

...

optional arguments to FUN.

name_transform

A function to transform X before using it as the output's names.


MEDSL/medslcleaner documentation built on May 31, 2019, 7:39 a.m.