I have a number of dataframe variables like store_1, store_2, store_3...... I want to keep the variables name in a list, like store=[store_1, store_2, store_3,....] so that when ever I do store[1] or store[2] i get the variables store_1 or store_2 and then i can use these variables to get some values as they are datarame variables. But I am getting error when I am trying to do it. I have give a simple example below to make my wordings more clear
group_by_week <- data.frame(Year=integer())
group_by_week[1,1]=5
group_by_week[1,1] # on executing this i get
> group_by_week[1,1]
[1] 5
Now I am creating a list and entering the dataframe name group_by_week into it
storeList = list()
storeList = append(storeList,'group_by_week')
storeList[1] # on executing this I am getting
> storeList[1]
[[1]]
[1] "group_by_week"
But now if i try to do storeList[1][1,1]
I am getting error Error in storeList[1][1, 1] : incorrect number of dimensions
which i think is obvious to get but don't know how to solve it.