Skip to contents

[Stable] Set arguments of a CallableFunction

Usage

set_args(x, args)

# S3 method for CallableFunction
set_args(x, args)

# S3 method for CallableCode
set_args(x, args)

# S3 method for TealDatasetConnector
set_args(x, args)

Arguments

x

CallableFunction or TealDatasetConnector)

args

(NULL or named list) dynamic arguments to function

Value

nothing

Examples

## Using CallableFunction
fun <- callable_function(example_cdisc_data)
set_args(fun, list(dataname = "ADSL"))
## Using CallableCode
code <- callable_code("example_cdisc_data()")
set_args(code, list(df = "adsl"))
#> Warning: 'CallableCode' is unchangable. Ignoring arguments set by 'set_args'
## Using TealDatasetConnector
ds <- dataset_connector("x", pull_callable = callable_function(data.frame))
set_args(ds, list(x = 1:5, y = letters[1:5]))