if (identical(Sys.getenv("TAR_INTERACTIVE_EXAMPLES"), "true")) {
tar_reprex(
pipeline = {
list(
tar_target(data, data.frame(x = sample.int(1e3))),
tar_target(summary, mean(data$x, na.rm = TRUE))
)
},
run = {
tar_visnetwork()
tar_make()
}
)
}
Run the code above in your browser using DataLab