-
Here is my situation. I am using static branching to run a pipeline of targets across a set of starting parameters. The end of the pipeline is a Rmd report. Everything worked groovy for a non-branched version of my _targets.R. Now I am having an issue. Here is an example, say Here is something similar to what I have in my Rmd:
How do I tell targets that I want the branched version in these calls in the Rmd? Here is a small example:
myreport.Rmd contains: title: "Untitled"
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 7 replies
-
As a workaround, if you want to load all the data in the report, you can call |
Beta Was this translation helpful? Give feedback.
-
Thanks @awalsh17 for providing your code solution as I encountered the same issue of wanting to tar_render within static branching (with a report per branch). Your solution worked great. Since 2021 has anyone got a better solution? @wlandau |
Beta Was this translation helpful? Give feedback.
As a workaround, if you want to load all the data in the report, you can call
tar_load(starts_with("final_data"))
. Functions liketar_load()
understandtidyselect
syntax. From then on though, you would have to reference each dataset by branch name. Alternatively, to create a target with all the data together in one object, you could have a look attarchetypes::tar_combine()
.