I have 2 variables, and a list. I want to use the two variables to access to the list files, but I don´t know how to deal with it.
Imagien that I have this:
data <- list()
data$one <- "first"
And that I have 2 variables, var1, and var2:
var1 <- "data"
var2 <- "one"
How can I use this variables to access to data$one?
I have tried with:
get(paste0(var1,"$",var2))
But I get an error:
Error in get(paste0(var1,"$",var2)): object data$one not found