Replies: 1 comment 4 replies
-
It's the same underlying issue as #18 and #104, as explained in #18 (comment). You could consider a similar |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Help
Description
Reprex
_targets.R file:
report_template.Rmd file (in same directory):
Desired result
I am trying to use tarchetypes::tar_map() to iterate over each row of the 'values' data frame, creating the defined targets for each. I am then trying to render an R markdown document - one for each of the rows of the 'values' data frame. Each file should be named accordingly - here I am trying to create 3 html files: "results_one.html", "results_two.html", and "results_three.html", where the names of the files are dynamically generated. In each of these Rmarkdown documents, I am trying to use tar_read(simple_calc) to get the result of the 'simple calculation' for each of the rows of the 'values' data frame. So in "results_one.html" it should print 11, in "results_two.html" it should print 12, and in "results_three.html" it should print 13.
Error message received when I run tar_make():
What have I investigated / tried?
Similar questions asked before here #18 and here #104 though these don't seem to exactly match my issue? tar_render_raw() doesn't seem quite the thing I want?
I have also read in the tarchetypes documentation that "tar_map() is incompatible with tar_render() because the latter operates on preexisting tar_target() objects" so this suggests what I'm trying to achieve maybe isn't possible? If this is the case, is there a work around / alternative method to achieve the desired result?
Session Info
Beta Was this translation helpful? Give feedback.
All reactions