How can I get from this:
names <- c(\"a\", \"b\") values <- c(1, 2)
To This:
list( list(\"a\" = 1) ,list(\"b
We can use
list(setNames(as.list(values), names))