How can I get from this:
names <- c("a", "b")
values <- c(1, 2)
To This:
list(
list("a" = 1)
,list("b" = 2)
)
I know this do not works:
ll <- list()
for(n in 1:length(names)){
ll <- append(ll, list(names[n] = values[[n]]))
}
Any clue?