named_lapply: Create a named list with 'lapply' from a character vector

Description Usage Arguments Value

View source: R/utilities.R

Description

Create a named list with lapply from a character vector

Usage

1
named_lapply(.names, FUN, ...)

Arguments

.names

A character vector holding the names of the list

FUN

Here comes the great difference to base::lapply() and base::sapply(). When using lapplI and sapplI, the function passed into FUN may also have an extra argument .I. If it does, then for each item of X the current item index is passed into argument .I of FUN. Besides this extra feature, there is no difference to base::lapply() and base::sapply().

...

optional arguments to FUN.

Value

A named list


labelmachine documentation built on Oct. 11, 2019, 9:05 a.m.