In R, how to combine data frames in for loop.
I have data frames item1, item2, item3... and I want to combine them into pairs of item11, item12, item13, item21, item 22, ..., so below is the for loop:
I am having trouble finding the right code to access item1, item2, item3... individually. In Python, it can be done using "item{}.format(i), item{}.format(j)", but is there a similar expression in R? Or it needs to be done otherwisely? Thanks in advance!!
for (j in 1:3){
for (i in 1:3){
assign(paste0("item", i, j), rbind(item_i, item_j))
}
}