I know how to eval a string, so I can use it as variable.
But I don't know how to 'eval' a string to use it as dataset.
My problem:
I have different datasets with the same structure. The names of the datasets are for example data010 to data019. I want to bind them (via bind_rows).
This is not working:
for (i %in% c(10:19)){
if (i == 1)
df <- eval(paste("data0",i)) # eval(parse(paste("data0",i))) is also not working
else
df <- df %>% bind_rows(eval(paste("data0",i)))
}
So how to eval
a dataset's name given as string?