Closed robitalec closed 3 years ago
The issue is that plan()
is a deprecated function in drake
and you have not assigned your own object to the symbol plan
. It will work if plan.R
looks like this:
library(drake)
plan <- drake_plan( # Assign the plan to a variable.
printed = print('test')
)
The plan need not be called plan
.
# plan.R
library(drake)
your_plan <- drake_plan( # Assign the plan to a variable.
printed = print('test')
)
# _drake.R
source("plan.R")
drake_config(your_plan)
Just improved the error message in the dev version.
Thanks @wlandau.
The new error message helps point me to double check the drake_plan()
assignment, perfect.
Sorry about the confusion for the second note - in haste I swapped the name of the variable to check, but forgot that it is simply whatever the plan is named, passed to drake_config()
.
Much appreciated.
Prework
Description
Found an uninformative error thrown by drake if the plan in
plan.R
is not assigned to a variable named "plan" or assigned altogether. This happened by accident just copying over a plan to a new project, and it took me a moment to figure out what was going on.The same error is thrown if you assign the plan to a variable but not named "plan".Reproducible example
_drake.R
scripts/plan.R