I'm trying to write complex R code that depends on my data. For example, suppose x = c(1,3,17), but critically I don't know how many elements x has ahead of time. All I know is that x is a vector of integers. I want to use x to create a code block like this:
a = fcn(complex_stuff,
thing(abc = xyz, 1, zyx),
thing(abc = xyz, 3, zyx),
thing(abc = xyz, 17, zyx),
more_complex_stuff
)