llapply: Version of lapply that turns the input list into a list with...

View source: R/llapply.R

llapplyR Documentation

Version of lapply that turns the input list into a list with elements of length one

Description

Allows lapply to work on elements that are themselves lists of length one so that the name of each element is available within the function called by lapply.

Usage

llapply(x, FUN = function(x) x, ...)

Arguments

x

a vector (atomic or list each of whose elements will be made into a list of length one and inserted into a list to be passed to lapply.

FUN

a function to be applied to each element of the list formed from x. If FUN is missing, it defaults to the identity function, thus returning x turned into a list of elements of length one.

...

additional variables passed to lapply if FUN returns a vector of length 1.


gmonette/spida2 documentation built on Aug. 20, 2023, 7:21 p.m.