[help] Define many targets from one source, without triggering re-run of all targets when source changes #1512
Unanswered
pdavidboll
asked this question in
Help
Replies: 1 comment 1 reply
-
Why are you putting the functions in a list? If you define each one separately, changes to one won't affect the other. I suppose it might have something to do with static branching, but you could also consider dynamic branching. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Help
Description
Hi,
I am using targets to run a large simulation study, in which I need to first simulate a number of DGPs and then analyse the simulated data for each DGP. So far, I am defining the DGPs as a list in a separate .R file as follows:
and I source this .R file at the top of the _targets.R file. Then, I use this list to build static targets via tar_map.
The problem is that whenever I change anything in one of the DGP functions, targets re-runs the whole pipeline. I understand why, but I would like to figure out a way for me define the DGPs in such a way that I can change one of the DGPs or add a new DGP to the list without triggering a re-run of all simulations for the unaffected DGPs.
Any help would be much appreciated.
Beta Was this translation helpful? Give feedback.
All reactions