Skip to content
Discussion options

You must be logged in to vote

That's a tricky one. Those envvars are available during tar_make() for both read and write, but not necessarily for tar_read() outside a pipeline. Since environment variables could contain secrets like security credentials, targets does not save them. So you'll have to manually set the resources in the interactive R session where you want to run tar_read().

tar_option_set(resources = tar_resources(
  custom = tar_resources_custom_format(c(foo = "bar"))
))
object <- tar_read(a)
attr(object, "write_has_foo")
#> [1] TRUE
attr(object, "read_has_foo")
#> [1] TRUE

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@brownag
Comment options

@wlandau
Comment options

Answer selected by brownag
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants