Targets has static and dynamic branching do we want something similar here?
If so, then what should the syntax be. Current thinking would be
pipeline({
a <- load_dat(CONFIG$data)
b[] <- dothing(a)
c <- MAP(b, somefun)
d <- use_all_of(b)
})
- Here
b[]means that we are expecting a list output and each element will be saved in a separateb_idobject in the cache. - We would need a special
MAP()function when applying to each element of b and it would need to handle mapping across multiple variables. - Where
MAP()is not used input would be recombined back in to a list. Would this be element-wise?
Targets has static and dynamic branching do we want something similar here?
If so, then what should the syntax be. Current thinking would be
```R
pipeline({
a <- load_dat(CONFIG$data)
b[] <- dothing(a)
c <- MAP(b, somefun)
d <- use_all_of(b)
})
```
- Here `b[]` means that we are expecting a list output and each element will be saved in a separate `b_id` object in the cache.
- We would need a special `MAP()` function when applying to each element of b and it would need to handle mapping across multiple variables.
- Where `MAP()` is not used input would be recombined back in to a list. Would this be element-wise?