I have a bunch of objects in the R environment which I want to call them in a loop.
assume x1, x2, x3, x4
are data frames in R environment, and NAME_0
is a column in all of the dfs.
What I am aiming to do is:
for (i i 1:4) {
print(unique(paste0('x',i)$NAME_0)
}
I get an error: object of type 'symbol' is not subsettable
I am not sure how to circumvent this!?