Does anyone have an example of how to use static branching from the targets package (R)? I'm reading targets manual on static branching but I'm having a hard time understanding it (even though I do get dynamic branching).
            Asked
            
        
        
            Active
            
        
            Viewed 475 times
        
    1 Answers
3
            
            
        Here's an example _targets.R very similar to a project I have:
library(targets)
library(tarchetypes)
library(dplyr)
params <- tribble(
  ~name, ~arg1,  ~arg2,  
  "A",  "a",  1,    
  "B",  "b",  2,
  "C",  "c",  3  
) 
mapped_pipeline <- tar_map(
  values = params, 
  names = "name",
  tar_target(first_target,
             f(arg1, arg2)),
  tar_target(second_target,
             g(first_target)
  )
)
tar_pipeline(pipeline)
        yogevmh
        
- 316
 - 1
 - 5
 
