List new targets
List all the targets whose last successful run occurred after a certain point in time.
tar_newer( time, names = NULL, inclusive = FALSE, store = targets::tar_config_get("store") )
time |
A |
names |
Names of eligible targets. Targets excluded from |
inclusive |
Logical of length 1, whether to include targets
built at exactly the |
store |
Character of length 1, path to the
|
Only applies to targets with recorded time stamps:
just non-branching targets and individual dynamic branches.
As of targets
version 0.6.0, these time
stamps are available for these targets regardless of
storage format. Earlier versions of targets
do not record
time stamps for remote storage formats such as "url"
or any of the "aws_*"
formats.
A character vector of names of old targets with recorded timestamp metadata.
Other time:
tar_older()
,
tar_timestamp_raw()
,
tar_timestamp()
if (identical(Sys.getenv("TAR_EXAMPLES"), "true")) { tar_dir({ # tar_dir() runs code from a temporary directory. tar_script({ list(tar_target(x, seq_len(2))) }, ask = FALSE) tar_make() # targets newer than 1 week ago tar_newer(Sys.time() - as.difftime(1, units = "weeks")) # targets newer than 1 week from now tar_newer(Sys.time() + as.difftime(1, units = "weeks")) # Everything is still up to date. tar_make() # Invalidate all targets targets newer than 1 week ago # so they run on the next tar_make(). invalidate_these <- tar_newer(Sys.time() - as.difftime(1, units = "weeks")) tar_invalidate(all_of(invalidate_these)) tar_make() }) }
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.