list.do: Call a function with a list of arguments

Description Usage Arguments Examples

View source: R/list.do.R

Description

Call a function with a list of arguments

Usage

1
list.do(.data, fun, ...)

Arguments

.data

list. vector will be coreced to list before being passed to fun.

fun

The function to call

...

The additional parameters passed to do.call

Examples

1
2
3
x <- lapply(1:3, function(i) { c(a=i,b=i^2)})
df <- lapply(1:3, function(i) { data.frame(a=i,b=i^2,c=letters[i])})
list.do(x, rbind)

Example output

     a b
[1,] 1 1
[2,] 2 4
[3,] 3 9

rlist documentation built on Sept. 5, 2021, 5:30 p.m.