Skip to content

Track changes of exported data of packages #352

Closed Answered by wlandau
psychelzh asked this question in Help
Discussion options

You must be logged in to vote

Unfortunately, the environment returned by getNamespace() does not include datasets, which is how targets would handle this. In cases where you do need to track a dataset from a package, you can assign it to a global variable in _targets.R.

library(targets)
 
tar_script({
library(targets)
library(gapminder)
dataset <- gapminder
list(tar_target(data_target, dataset))
})
  
tar_visnetwork()

Created on 2021-03-21 by the reprex package (v1.0.0)

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@psychelzh
Comment options

@wlandau
Comment options

@psychelzh
Comment options

Answer selected by psychelzh
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