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)

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.

Value

Evaluated function.

Examples

mean_1_to_10 <- dr_func_eval("mean", v = c("mean", "sd"))(1:10)
x <- system.file("extdata/tso/sample705.fragment_length_hist.json.gz", package = "dracarys")
obj <- dr_func_eval("TsoFragmentLengthHistFile")$new(x)