When calling a function via do.call(), specify the function by itself and not by its name, e.g.
## GOOD
y <- do.call(backgroundCorrect, args=args)
## BAD
y <- do.call("backgroundCorrect", args=args)
The former will cause backgroundCorrect() to be identified as a global object by the globals such that it is properly exported when evaluated by a future.
When calling a function via
do.call()
, specify the function by itself and not by its name, e.g.The former will cause
backgroundCorrect()
to be identified as a global object by the globals such that it is properly exported when evaluated by a future.