From 079ef5c55950c47f0479647289a195be2e94c6a1 Mon Sep 17 00:00:00 2001 From: wlandau-lilly Date: Tue, 20 Feb 2024 10:39:55 -0500 Subject: [PATCH] descriptions in tar_age() --- R/tar_age.R | 6 ++++-- man/tar_age.Rd | 12 +++++++++++- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/R/tar_age.R b/R/tar_age.R index bd22f86a..00c67b7f 100644 --- a/R/tar_age.R +++ b/R/tar_age.R @@ -66,7 +66,8 @@ tar_age <- function( resources = targets::tar_option_get("resources"), storage = targets::tar_option_get("storage"), retrieval = targets::tar_option_get("retrieval"), - cue = targets::tar_option_get("cue") + cue = targets::tar_option_get("cue"), + description = targets::tar_option_get("description") ) { name <- targets::tar_deparse_language(substitute(name)) envir <- tar_option_get("envir") @@ -101,6 +102,7 @@ tar_age <- function( resources = resources, storage = storage, retrieval = retrieval, - cue = cue + cue = cue, + description = description ) } diff --git a/man/tar_age.Rd b/man/tar_age.Rd index 0c7a1315..62beff6d 100644 --- a/man/tar_age.Rd +++ b/man/tar_age.Rd @@ -23,7 +23,8 @@ tar_age( resources = targets::tar_option_get("resources"), storage = targets::tar_option_get("storage"), retrieval = targets::tar_option_get("retrieval"), - cue = targets::tar_option_get("cue") + cue = targets::tar_option_get("cue"), + description = targets::tar_option_get("description") ) } \arguments{ @@ -177,6 +178,15 @@ section for background.) This cue object should contain any optional secondary invalidation rules, anything except the \code{mode} argument. \code{mode} will be automatically determined by the \code{age} argument of \code{tar_age()}.} + +\item{description}{Character of length 1, a custom free-form human-readable +text description of the target. Descriptions appear as target labels +in functions like \code{\link[targets:tar_manifest]{tar_manifest()}} and \code{\link[targets:tar_visnetwork]{tar_visnetwork()}}, +and they let you select subsets of targets for the \code{names} argument of +functions like \code{\link[targets:tar_make]{tar_make()}}. For example, +\code{tar_manifest(names = tar_described_as(starts_with("survival model")))} +lists all the targets whose descriptions start with the character +string \code{"survival model"}.} } \value{ A target object. See the "Target objects" section for background.