I want to do something like the following in R:
a <- list(
x = 2 + 7,
y = x + 8
)
It appears that this is not possible, though, or at least not in this way. Is there any way to use the value of x in defining y? I know I could define two objects independently, x and y, then do list(x, y), but I'd rather skip creating a lot of extra objects in my workspace.