tar_map over patterns and targets #163
Closed
CorradoLanera
started this conversation in
General
Replies: 1 comment 1 reply
-
At a glance, this looks like a nice way to structure your pipeline. This kind of dynamic-within-static branching actually comes up so much that |
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
-
Help
Description
Doing analyses based both on multiple DBs to import, and considering multiple (identically analyzed) scenarios, I have found my list of targets extremely redundant, copy-pasted error-prone, and not that easy to quickly find steps (all because of numerous targets created).
I started investigating tar_map to extract common patterns in targets' generation. After some research in the documentation (and here, e.g., #162, #150) and some experiments, I have found a working solution.
The aim of this discussion is, from one side to report my solution to others, from the other side ask if my approach is the correct/suggested/best one.
Thank you!
Corrado.
The idea
map
(think of importing multiple files in data frames (e.g.:a
,b
) from a few distinct folders (e.g.:db_1
,db_2
,db_3
))pid
s, to retain in the others)db
)Standard and tar_map approaches
In both cases the network remain the same:
Created on 2023-12-14 with reprex v2.0.2
Beta Was this translation helpful? Give feedback.
All reactions