Skip to contents

This is somewhat a hack for getting a function to evaluate based on a lookup vector. If the function is not found, it returns NULL.

Usage

dr_func_eval(f, v = NULL, envir = parent.frame())

Arguments

f

Name of function to evaluate.

v

Character vector of strings evaluating to functions. By default, this points to the functions in the DR_FILE_REGEX dracarys tibble.

envir

the environment in which to evaluate the function e.g. use self when using inside R6 classes.

Value

Evaluated function.

Examples

mean_1_to_10 <- dr_func_eval("mean", v = c("mean", "sd"))(1:10)