Learn R Programming

targets (version 0.4.1)

tar_workspaces: List saved target workspaces.

Description

List target workspaces currently saved to _targets/workspaces/. See tar_workspace() for more information.

Usage

tar_workspaces(names = NULL)

Arguments

names

Optional tidyselect selector to return a tactical subset of workspace names. If NULL, all names are selected.

Value

Character vector of available workspaces to load with tar_workspace().

See Also

Other debug: tar_traceback(), tar_workspace()

Examples

Run this code
# NOT RUN {
if (identical(Sys.getenv("TAR_LONG_EXAMPLES"), "true")) {
tar_dir({ # tar_dir() runs code from a temporary directory.
tar_script({
  tar_option_set(error = "workspace")
  list(
    tar_target(x, "value"),
    tar_target(y, x)
  )
}, ask = FALSE)
tar_make()
tar_workspaces()
tar_workspaces(contains("x"))
})
}
# }

Run the code above in your browser using DataLab