Write an example _drake.R
script to the current working directory.
Source: R/drake_script.R
drake_script.Rd
Arguments
- code
R code to put in
_drake.R
in the current working directory. IfNULL
, an example script is written.
Examples
if (FALSE) {
isolate_example("contain side-effects", {
drake_script({
library(drake)
plan <- drake_plan(x = 1)
drake_config(plan, lock_cache = FALSE)
})
cat(readLines("_drake.R"), sep = "\n")
r_make()
})
}