In R, how can I build a list with some elements referring to earlier elements in the list?
You can use dplyr::lst
which is same as list
but here you can build the components sequentially.
dplyr::lst(
width = 128,
overlap=width/2,
)
#$width
#[1] 128
#$overlap
#[1] 64
Another option is:
opts = list(
width={width<-128},
overlap=width/2
)