I'm trying to create a loop in R that would create a dataframe with different name with each passing. I boiled down the problem to a simple example: Say I have 3 dataframes named a1, a2 and a3 and I would like to print them out in console using loop.
I came up with following code
a <- 1:3
for(i in a){
a[[i]]
}
But I get a message that object of type 'closure' is not subsettable