powered by
Cancel a target while its command is running if a condition is met.
tar_cancel(condition = TRUE)
Logical of length 1, whether to cancel the target.
Must be invoked by the target itself. tar_cancel() cannot interrupt a target from another process.
tar_cancel()
# NOT RUN { refresh_data_on_mondays <- function() { tar_cancel(!is_monday()) } x <- tar_target(x, refresh_data_on_mondays()) # }
Run the code above in your browser using DataLab