Learn R Programming

doBy (version 4.6.22)

bquote_fun_list: Backquote a list of functions

Description

Backquote a list of functions

Usage

bquote_fun_list(fun_list)

Arguments

fun_list

List of functions

See Also

base::bquote(), set_default(), section_fun()

Examples

Run this code

## Evaluate a list of functions
f1 <- function(x){x + 1}
f2 <- function(x){x + 8}

f1_ <- set_default(f1, list(x=10))
f2_ <- set_default(f2, list(x=10))

f1_(); f2_()

fn_list  <- list(f1_, f2_)
fn_list_ <- bquote_fun_list(fn_list)

eval(fn_list[[1]])     ## No
sapply(fn_list, eval)  ## No

eval(fn_list_[[1]])    ## Yes
sapply(fn_list_, eval) ## Yes

Run the code above in your browser using DataLab