# NOT RUN {
if (identical(Sys.getenv("TAR_INTERACTIVE_EXAMPLES"), "true")) {
tar_dir({ # tar_dir() runs code from a temporary directory.
tar_script({
list(
tar_target(x, seq_len(100)),
tar_target(y, Sys.sleep(0.1), pattern = map(x))
)
}, ask = FALSE)
px <- tar_make(callr_function = callr::r_bg, reporter = "silent")
tar_poll()
})
}
# }
Run the code above in your browser using DataLab