# NOT RUN {
tar_dir({ # tar_dir() runs code from a temporary directory.
tar_script({
tar_option_set()
list(tar_target(x, 1 + 1))
})
tar_make()
tar_script({
tar_option_set()
list(
tar_target(y1, 1 + 1),
tar_target(y2, 1 + 1),
tar_target(z, y1 + y2)
)
}, ask = FALSE)
tar_make(starts_with("y")) # Only builds y1 and y2.
})
# }
Run the code above in your browser using DataLab