Suppose I have
label <- 'My val'
and I try to create the list
Output <- list(
label = pi
)
I get that the name of the first (only) object in the list is "label" but I want "My val".
I understand I can do
names(Output) <- label
But the list is quite long and I'd rather name it in the list function.