From 7d8c7b8331af06c3564c32e3dde0097abbd01ba9 Mon Sep 17 00:00:00 2001 From: wlandau Date: Mon, 18 Jan 2021 08:49:22 -0500 Subject: [PATCH] Change internal env var name --- R/tar_branches.R | 2 +- R/tar_cancel.R | 2 +- R/tar_deduplicate.R | 2 +- R/tar_delete.R | 2 +- R/tar_destroy.R | 2 +- R/tar_envir.R | 2 +- R/tar_glimpse.R | 2 +- R/tar_group.R | 2 +- R/tar_invalidate.R | 2 +- R/tar_load.R | 4 ++-- R/tar_make_clustermq.R | 2 +- R/tar_make_future.R | 2 +- R/tar_manifest.R | 2 +- R/tar_meta.R | 2 +- R/tar_name.R | 2 +- R/tar_network.R | 2 +- R/tar_objects.R | 2 +- R/tar_option_get.R | 2 +- R/tar_option_reset.R | 2 +- R/tar_option_set.R | 2 +- R/tar_outdated.R | 2 +- R/tar_path.R | 2 +- R/tar_progress.R | 2 +- R/tar_prune.R | 2 +- R/tar_read.R | 2 +- R/tar_seed.R | 2 +- R/tar_sitrep.R | 2 +- R/tar_target.R | 2 +- R/tar_target_raw.R | 2 +- R/tar_traceback.R | 2 +- R/tar_validate.R | 2 +- R/tar_visnetwork.R | 2 +- R/tar_watch.R | 2 +- R/tar_workspace.R | 2 +- R/tar_workspaces.R | 2 +- 35 files changed, 36 insertions(+), 36 deletions(-) diff --git a/R/tar_branches.R b/R/tar_branches.R index e56070710..67bc842ba 100644 --- a/R/tar_branches.R +++ b/R/tar_branches.R @@ -16,7 +16,7 @@ #' (including the branched-over targets and the target with the pattern.) #' @inheritParams tar_target #' @examples -#' if (identical(Sys.getenv("TARGETS_LONG_EXAMPLES"), "true")) { +#' if (identical(Sys.getenv("TAR_LONG_EXAMPLES"), "true")) { #' tar_dir({ # Write all files to a temporary directory. #' tar_script( #' list( diff --git a/R/tar_cancel.R b/R/tar_cancel.R index 4efd30d87..4fd0f65a4 100644 --- a/R/tar_cancel.R +++ b/R/tar_cancel.R @@ -6,7 +6,7 @@ #' cannot interrupt a target from another process. #' @param condition Logical of length 1, whether to cancel the target. #' @examples -#' if (identical(Sys.getenv("TARGETS_LONG_EXAMPLES"), "true")) { +#' if (identical(Sys.getenv("TAR_LONG_EXAMPLES"), "true")) { #' tar_dir({ # Write all files to a temporary directory. #' tar_script(tar_target(x, tar_cancel(1 > 0))) #' tar_make() # Should cancel target x. diff --git a/R/tar_deduplicate.R b/R/tar_deduplicate.R index ee90c203c..b48ced168 100644 --- a/R/tar_deduplicate.R +++ b/R/tar_deduplicate.R @@ -12,7 +12,7 @@ #' @param progress Logical, whether to deduplicate the progress database file #' at `_targets/meta/progress`. #' @examples -#' if (identical(Sys.getenv("TARGETS_LONG_EXAMPLES"), "true")) { +#' if (identical(Sys.getenv("TAR_LONG_EXAMPLES"), "true")) { #' tar_dir({ # Write all files to a temporary directory. #' tar_script(list(tar_target(x, 1 + 1))) #' tar_make() diff --git a/R/tar_delete.R b/R/tar_delete.R index 94da563b8..7bbd838e1 100644 --- a/R/tar_delete.R +++ b/R/tar_delete.R @@ -11,7 +11,7 @@ #' You can supply symbols, a character vector, #' or `tidyselect` helpers like [starts_with()]. #' @examples -#' if (identical(Sys.getenv("TARGETS_LONG_EXAMPLES"), "true")) { +#' if (identical(Sys.getenv("TAR_LONG_EXAMPLES"), "true")) { #' tar_dir({ # Write all files to a temporary directory. #' tar_script( #' list( diff --git a/R/tar_destroy.R b/R/tar_destroy.R index 5c07fb617..fd174c237 100644 --- a/R/tar_destroy.R +++ b/R/tar_destroy.R @@ -19,7 +19,7 @@ #' if `error = "workspace"` in [tar_option_set()] or [tar_target()]. #' Load a workspace with [tar_workspace()]. #' @examples -#' if (identical(Sys.getenv("TARGETS_LONG_EXAMPLES"), "true")) { +#' if (identical(Sys.getenv("TAR_LONG_EXAMPLES"), "true")) { #' tar_dir({ # Write all files to a temporary directory. #' tar_script(list(tar_target(x, 1 + 1))) #' tar_make() # Creates the _targets/ data store. diff --git a/R/tar_envir.R b/R/tar_envir.R index 94e499f26..f9b53c677 100644 --- a/R/tar_envir.R +++ b/R/tar_envir.R @@ -18,7 +18,7 @@ #' @examples #' tar_envir() #' tar_envir(default = new.env(parent = emptyenv())) -#' if (identical(Sys.getenv("TARGETS_LONG_EXAMPLES"), "true")) { +#' if (identical(Sys.getenv("TAR_LONG_EXAMPLES"), "true")) { #' tar_dir({ # Write all files to a temporary directory. #' tar_script(tar_target(x, tar_envir(default = parent.frame()))) #' tar_make(x) diff --git a/R/tar_glimpse.R b/R/tar_glimpse.R index b232da69f..c5cb5ebcb 100644 --- a/R/tar_glimpse.R +++ b/R/tar_glimpse.R @@ -26,7 +26,7 @@ #' the `levelSeparation` argument of `visHierarchicalLayout()` #' defaults to `150`. #' @examples -#' if (identical(Sys.getenv("TARGETS_INTERACTIVE_EXAMPLES"), "true")) { +#' if (identical(Sys.getenv("TAR_INTERACTIVE_EXAMPLES"), "true")) { #' tar_dir({ # Write all files to a temporary directory. #' tar_script({ #' tar_option_set() diff --git a/R/tar_group.R b/R/tar_group.R index d9a88044f..036a30d6e 100644 --- a/R/tar_group.R +++ b/R/tar_group.R @@ -20,7 +20,7 @@ #' `targets` will use to find subsets of your data frame. #' @param x Grouped data frame from `dplyr::group_by()` #' @examples -#' if (identical(Sys.getenv("TARGETS_LONG_EXAMPLES"), "true")) { +#' if (identical(Sys.getenv("TAR_LONG_EXAMPLES"), "true")) { #' # The tar_group() function simply creates #' # a tar_group column to partition the rows #' # of a data frame. diff --git a/R/tar_invalidate.R b/R/tar_invalidate.R index 4e111371e..ed7c385e6 100644 --- a/R/tar_invalidate.R +++ b/R/tar_invalidate.R @@ -10,7 +10,7 @@ #' You can supply symbols, a character vector, #' or `tidyselect` helpers like [starts_with()]. #' @examples -#' if (identical(Sys.getenv("TARGETS_LONG_EXAMPLES"), "true")) { +#' if (identical(Sys.getenv("TAR_LONG_EXAMPLES"), "true")) { #' tar_dir({ # Write all files to a temporary directory. #' tar_script( #' list( diff --git a/R/tar_load.R b/R/tar_load.R index 74fa73e1e..6b2899c77 100644 --- a/R/tar_load.R +++ b/R/tar_load.R @@ -10,7 +10,7 @@ #' check/build all the targets (default). Otherwise, you can supply #' symbols, a character vector, or `tidyselect` helpers like [starts_with()]. #' @examples -#' if (identical(Sys.getenv("TARGETS_LONG_EXAMPLES"), "true")) { +#' if (identical(Sys.getenv("TAR_LONG_EXAMPLES"), "true")) { #' tar_dir({ # Write all files to a temporary directory. #' tar_script( #' list( @@ -46,7 +46,7 @@ tar_load <- function( #' for any targets that are patterns. #' @param envir Environment to put the loaded targets. #' @examples -#' if (identical(Sys.getenv("TARGETS_LONG_EXAMPLES"), "true")) { +#' if (identical(Sys.getenv("TAR_LONG_EXAMPLES"), "true")) { #' tar_dir({ # Write all files to a temporary directory. #' tar_script( #' list( diff --git a/R/tar_make_clustermq.R b/R/tar_make_clustermq.R index 11d8f742e..9d8ea8b58 100644 --- a/R/tar_make_clustermq.R +++ b/R/tar_make_clustermq.R @@ -25,7 +25,7 @@ #' and `clustermq::workers()`. #' @examples #' if (!identical(tolower(Sys.info()[["sysname"]]), "windows")) { -#' if (identical(Sys.getenv("TARGETS_LONG_EXAMPLES"), "true")) { +#' if (identical(Sys.getenv("TAR_LONG_EXAMPLES"), "true")) { #' tar_dir({ # Write all files to a temporary directory. #' tar_script({ #' options(clustermq.scheduler = "multicore") # Does not work on Windows. diff --git a/R/tar_make_future.R b/R/tar_make_future.R index f3ec92372..cf0fe5dc1 100644 --- a/R/tar_make_future.R +++ b/R/tar_make_future.R @@ -15,7 +15,7 @@ #' @param workers Positive integer, maximum number of transient #' `future` workers allowed to run at any given time. #' @examples -#' if (identical(Sys.getenv("TARGETS_LONG_EXAMPLES"), "true")) { +#' if (identical(Sys.getenv("TAR_LONG_EXAMPLES"), "true")) { #' tar_dir({ # Write all files to a temporary directory. #' tar_script({ #' future::plan(future::multisession) diff --git a/R/tar_manifest.R b/R/tar_manifest.R index 7b59d99f5..7e4a7685b 100644 --- a/R/tar_manifest.R +++ b/R/tar_manifest.R @@ -39,7 +39,7 @@ #' * `packages`: List columns of packages loaded before building the target. #' * `library`: List column of library paths to load the packages. #' @examples -#' if (identical(Sys.getenv("TARGETS_LONG_EXAMPLES"), "true")) { +#' if (identical(Sys.getenv("TAR_LONG_EXAMPLES"), "true")) { #' tar_dir({ # Write all files to a temporary directory. #' tar_script({ #' tar_option_set() diff --git a/R/tar_meta.R b/R/tar_meta.R index 993e9c443..5e0edcf28 100644 --- a/R/tar_meta.R +++ b/R/tar_meta.R @@ -39,7 +39,7 @@ #' from the last run of the target. #' * `error`: character string of the error message if the target errored. #' @examples -#' if (identical(Sys.getenv("TARGETS_LONG_EXAMPLES"), "true")) { +#' if (identical(Sys.getenv("TAR_LONG_EXAMPLES"), "true")) { #' tar_dir({ # Write all files to a temporary directory. #' tar_script( #' list( diff --git a/R/tar_name.R b/R/tar_name.R index f316e00aa..629d45075 100644 --- a/R/tar_name.R +++ b/R/tar_name.R @@ -11,7 +11,7 @@ #' @examples #' tar_name() #' tar_name(default = "custom_target_name") -#' if (identical(Sys.getenv("TARGETS_LONG_EXAMPLES"), "true")) { +#' if (identical(Sys.getenv("TAR_LONG_EXAMPLES"), "true")) { #' tar_dir({ # Write all files to a temporary directory. #' tar_script(tar_target(x, tar_name())) #' tar_make() diff --git a/R/tar_network.R b/R/tar_network.R index 16524c37a..3ad9d9039 100644 --- a/R/tar_network.R +++ b/R/tar_network.R @@ -14,7 +14,7 @@ #' @param targets_only Logical, whether to restrict the output to just targets #' (`FALSE`) or to also include imported global functions and objects. #' @examples -#' if (identical(Sys.getenv("TARGETS_LONG_EXAMPLES"), "true")) { +#' if (identical(Sys.getenv("TAR_LONG_EXAMPLES"), "true")) { #' tar_dir({ # Write all files to a temporary directory. #' tar_script({ #' tar_option_set() diff --git a/R/tar_objects.R b/R/tar_objects.R index dcd8a2804..a0b88a5ef 100644 --- a/R/tar_objects.R +++ b/R/tar_objects.R @@ -3,7 +3,7 @@ #' @description List targets currently saved to `_targets/objects/`. #' Does not include dynamic files or cloud storage. #' @examples -#' if (identical(Sys.getenv("TARGETS_LONG_EXAMPLES"), "true")) { +#' if (identical(Sys.getenv("TAR_LONG_EXAMPLES"), "true")) { #' tar_dir({ # Write all files to a temporary directory. #' tar_script({ #' tar_option_set(workspace = "x") diff --git a/R/tar_option_get.R b/R/tar_option_get.R index a63c51d8b..c33d4dfe4 100644 --- a/R/tar_option_get.R +++ b/R/tar_option_get.R @@ -19,7 +19,7 @@ #' tar_target(x, 1)$settings$format #' tar_option_reset() # reset the format #' tar_target(x, 1)$settings$format -#' if (identical(Sys.getenv("TARGETS_LONG_EXAMPLES"), "true")) { +#' if (identical(Sys.getenv("TAR_LONG_EXAMPLES"), "true")) { #' tar_dir({ # Write all files to a temporary directory. #' tar_script({ #' tar_option_set(cue = tar_cue(mode = "always")) # All targets always run. diff --git a/R/tar_option_reset.R b/R/tar_option_reset.R index 1e5110b2d..246ab5636 100644 --- a/R/tar_option_reset.R +++ b/R/tar_option_reset.R @@ -12,7 +12,7 @@ #' tar_target(x, 1)$settings$format #' tar_option_reset() # reset all options #' tar_target(x, 1)$settings$format -#' if (identical(Sys.getenv("TARGETS_LONG_EXAMPLES"), "true")) { +#' if (identical(Sys.getenv("TAR_LONG_EXAMPLES"), "true")) { #' tar_dir({ # Write all files to a temporary directory. #' tar_script({ #' tar_option_set(cue = tar_cue(mode = "always")) diff --git a/R/tar_option_set.R b/R/tar_option_set.R index 98eaac1d1..0f99d3d2f 100644 --- a/R/tar_option_set.R +++ b/R/tar_option_set.R @@ -44,7 +44,7 @@ #' tar_target(x, 1)$settings$format #' tar_option_reset() # reset the format #' tar_target(x, 1)$settings$format -#' if (identical(Sys.getenv("TARGETS_LONG_EXAMPLES"), "true")) { +#' if (identical(Sys.getenv("TAR_LONG_EXAMPLES"), "true")) { #' tar_dir({ # Write all files to a temporary directory. #' tar_script({ #' tar_option_set(cue = tar_cue(mode = "always")) # All targets always run. diff --git a/R/tar_outdated.R b/R/tar_outdated.R index 597132801..9946dadc1 100644 --- a/R/tar_outdated.R +++ b/R/tar_outdated.R @@ -28,7 +28,7 @@ #' targets found so far. #' @inheritParams tar_validate #' @examples -#' if (identical(Sys.getenv("TARGETS_LONG_EXAMPLES"), "true")) { +#' if (identical(Sys.getenv("TAR_LONG_EXAMPLES"), "true")) { #' tar_dir({ # Write all files to a temporary directory. #' tar_script(list(tar_target(x, 1 + 1))) #' tar_outdated() diff --git a/R/tar_path.R b/R/tar_path.R index ac0a44ef2..94e26f8be 100644 --- a/R/tar_path.R +++ b/R/tar_path.R @@ -20,7 +20,7 @@ #' @examples #' tar_path() #' tar_path(your_target) -#' if (identical(Sys.getenv("TARGETS_LONG_EXAMPLES"), "true")) { +#' if (identical(Sys.getenv("TAR_LONG_EXAMPLES"), "true")) { #' tar_dir({ # Write all files to a temporary directory. #' tar_script(tar_target(returns_path, tar_path())) #' tar_make() diff --git a/R/tar_progress.R b/R/tar_progress.R index c055433c1..357bb27bc 100644 --- a/R/tar_progress.R +++ b/R/tar_progress.R @@ -11,7 +11,7 @@ #' You can supply symbols, a character vector, #' or `tidyselect` helpers like [starts_with()]. #' @examples -#' if (identical(Sys.getenv("TARGETS_LONG_EXAMPLES"), "true")) { +#' if (identical(Sys.getenv("TAR_LONG_EXAMPLES"), "true")) { #' tar_dir({ # Write all files to a temporary directory. #' tar_script( #' list( diff --git a/R/tar_prune.R b/R/tar_prune.R index abaad498f..d741376c5 100644 --- a/R/tar_prune.R +++ b/R/tar_prune.R @@ -11,7 +11,7 @@ #' the value is invisibly returned. #' @inheritParams tar_validate #' @examples -#' if (identical(Sys.getenv("TARGETS_LONG_EXAMPLES"), "true")) { +#' if (identical(Sys.getenv("TAR_LONG_EXAMPLES"), "true")) { #' tar_dir({ # Write all files to a temporary directory. #' tar_script( #' list( diff --git a/R/tar_read.R b/R/tar_read.R index 542e8a0c1..f55120f9c 100644 --- a/R/tar_read.R +++ b/R/tar_read.R @@ -36,7 +36,7 @@ tar_read <- function(name, branches = NULL, meta = tar_meta()) { #' However, if you call [tar_meta()] beforehand and supply it to the `meta` #' argument, then successive calls to `tar_read()` may run much faster. #' @examples -#' if (identical(Sys.getenv("TARGETS_LONG_EXAMPLES"), "true")) { +#' if (identical(Sys.getenv("TAR_LONG_EXAMPLES"), "true")) { #' tar_dir({ # Write all files to a temporary directory. #' tar_script(list(tar_target(x, 1 + 1))) #' tar_make() diff --git a/R/tar_seed.R b/R/tar_seed.R index 679e9a8ff..58ed2f411 100644 --- a/R/tar_seed.R +++ b/R/tar_seed.R @@ -13,7 +13,7 @@ #' @examples #' tar_seed() #' tar_seed(default = 123L) -#' if (identical(Sys.getenv("TARGETS_LONG_EXAMPLES"), "true")) { +#' if (identical(Sys.getenv("TAR_LONG_EXAMPLES"), "true")) { #' tar_dir({ # Write all files to a temporary directory. #' tar_script(tar_target(returns_seed, tar_seed())) #' tar_make() diff --git a/R/tar_sitrep.R b/R/tar_sitrep.R index f3144d47d..e4999dba2 100644 --- a/R/tar_sitrep.R +++ b/R/tar_sitrep.R @@ -62,7 +62,7 @@ #' Always `NA` if the `record` cue is activated. #' Otherwise, always `FALSE` if the `file` cue is suppressed. #' @examples -#' if (identical(Sys.getenv("TARGETS_LONG_EXAMPLES"), "true")) { +#' if (identical(Sys.getenv("TAR_LONG_EXAMPLES"), "true")) { #' tar_dir({ # Write all files to a temporary directory. #' tar_script( #' list( diff --git a/R/tar_target.R b/R/tar_target.R index 3c804b6ef..53d1527c2 100644 --- a/R/tar_target.R +++ b/R/tar_target.R @@ -180,7 +180,7 @@ #' print(data) #' tar_option_reset() #' # In a pipeline: -#' if (identical(Sys.getenv("TARGETS_LONG_EXAMPLES"), "true")) { +#' if (identical(Sys.getenv("TAR_LONG_EXAMPLES"), "true")) { #' tar_dir({ # Write all files to a temporary directory. #' tar_script(tar_target(x, 1 + 1)) #' tar_make() diff --git a/R/tar_target_raw.R b/R/tar_target_raw.R index 91aa6c4df..9505c7779 100644 --- a/R/tar_target_raw.R +++ b/R/tar_target_raw.R @@ -41,7 +41,7 @@ #' }) #' print(target_list[[1]]) #' print(target_list[[2]]) -#' if (identical(Sys.getenv("TARGETS_LONG_EXAMPLES"), "true")) { +#' if (identical(Sys.getenv("TAR_LONG_EXAMPLES"), "true")) { #' tar_dir({ # Write all files to a temporary directory. #' tar_script(tar_target_raw("x", quote(1 + 1))) #' tar_make() diff --git a/R/tar_traceback.R b/R/tar_traceback.R index a9d95f03d..eb286aaa8 100644 --- a/R/tar_traceback.R +++ b/R/tar_traceback.R @@ -14,7 +14,7 @@ #' should either be the global environment or inherit from the #' global environment. #' @examples -#' if (identical(Sys.getenv("TARGETS_LONG_EXAMPLES"), "true")) { +#' if (identical(Sys.getenv("TAR_LONG_EXAMPLES"), "true")) { #' tar_dir({ # Write all files to a temporary directory. #' tmp <- sample(1) #' tar_script({ diff --git a/R/tar_validate.R b/R/tar_validate.R index 3dedbecf3..e742de333 100644 --- a/R/tar_validate.R +++ b/R/tar_validate.R @@ -15,7 +15,7 @@ #' reproducible work. #' @param callr_arguments A list of arguments to `callr_function`. #' @examples -#' if (identical(Sys.getenv("TARGETS_LONG_EXAMPLES"), "true")) { +#' if (identical(Sys.getenv("TAR_LONG_EXAMPLES"), "true")) { #' tar_dir({ # Write all files to a temporary directory. #' tar_script(list(tar_target(x, 1 + 1))) #' tar_validate() diff --git a/R/tar_visnetwork.R b/R/tar_visnetwork.R index 3baf1890f..18a125804 100644 --- a/R/tar_visnetwork.R +++ b/R/tar_visnetwork.R @@ -29,7 +29,7 @@ #' at once, e.g. `label = c("time", "branches")`. All are disabled #' by default because they clutter the graph. #' @examples -#' if (identical(Sys.getenv("TARGETS_INTERACTIVE_EXAMPLES"), "true")) { +#' if (identical(Sys.getenv("TAR_INTERACTIVE_EXAMPLES"), "true")) { #' tar_dir({ # Write all files to a temporary directory. #' tar_script({ #' tar_option_set() diff --git a/R/tar_watch.R b/R/tar_watch.R index c5badd752..ebfbfa29a 100644 --- a/R/tar_watch.R +++ b/R/tar_watch.R @@ -23,7 +23,7 @@ #' @param verbose whether to print a spinner and informative messages. #' Only relevant if `background` is `TRUE`. #' @examples -#' if (identical(Sys.getenv("TARGETS_INTERACTIVE_EXAMPLES"), "true")) { +#' if (identical(Sys.getenv("TAR_INTERACTIVE_EXAMPLES"), "true")) { #' tar_dir({ # Write all files to a temporary directory. #' tar_script({ #' sleep_run <- function(...) { diff --git a/R/tar_workspace.R b/R/tar_workspace.R index aa6c4b319..1a79ec13e 100644 --- a/R/tar_workspace.R +++ b/R/tar_workspace.R @@ -29,7 +29,7 @@ #' should either be the global environment or inherit from the #' global environment. #' @examples -#' if (identical(Sys.getenv("TARGETS_LONG_EXAMPLES"), "true")) { +#' if (identical(Sys.getenv("TAR_LONG_EXAMPLES"), "true")) { #' tar_dir({ # Write all files to a temporary directory. #' tmp <- sample(1) #' tar_script({ diff --git a/R/tar_workspaces.R b/R/tar_workspaces.R index a93bb2166..d1f70b94d 100644 --- a/R/tar_workspaces.R +++ b/R/tar_workspaces.R @@ -3,7 +3,7 @@ #' @description List target workspaces currently saved to #' `_targets/workspaces/`. See [tar_workspace()] for more information. #' @examples -#' if (identical(Sys.getenv("TARGETS_LONG_EXAMPLES"), "true")) { +#' if (identical(Sys.getenv("TAR_LONG_EXAMPLES"), "true")) { #' tar_dir({ # Write all files to a temporary directory. #' tar_script({ #' tar_option_set(error = "workspace")