I have variables named var1, var2, ... var100 in data. How can I call them in a loop? I can loop over them and get the names as strings like this:
for (i in c(sprintf("data$var%s",seq(1,100)))) {
print(paste0(i))
}
But this gives me only the strings, and does not call the variables.