Learn R Programming

purrr (version 0.1.0)

invoke: Invoke every element of a list of functions.

Description

Invoke every element of a list of functions.

Usage

invoke(.x, ...)

invoke_lgl(.x, ...)

invoke_int(.x, ...)

invoke_dbl(.x, ...)

invoke_chr(.x, ...)

Arguments

.x
A function or list of functions.
...
Arguments passed to each function.

Examples

Run this code
middle <- list(m1 = mean, m2 = median)

middle %>% invoke(rcauchy(100))
middle %>% invoke_dbl(rcauchy(100))

Run the code above in your browser using DataLab