# NOT RUN {
triggers()
# }
# NOT RUN {
test_with_dir("Quarantine side effects.", {
load_mtcars_example() # Load drake's canonical example.
my_plan[["trigger"]] <- "command"
# You can have different triggers for different targets.
my_plan[["trigger"]][1] <- "file"
make(my_plan) # Run the project, build the targets.
# Change an imported dependency function.
reg2 <- function(d) {
d$x3 <- d$x ^ 3
lm(y ~ x3, data = d)
}
# Nothing changes! To react to `reg2`, you would need the
# "any" or "depends" trigger.
make(my_plan)
# You can use a global trigger if your workflow plan
# does not have a 'trigger' column.
my_plan[["trigger"]] <- NULL # Would override the global trigger.
make(my_plan, trigger = "missing") # Just build missing targets.
})
# }
Run the code above in your browser using DataLab