I have these lists in the global environment:
<code>list_1 <- list(data.frame(A = 1:3, B = 4:6), data.frame(A = 7:9, B = 10:12))
list_2 <- list(data.frame(X = 1:2, Y = 3:4), data.frame(X = 5:6, Y = 7:8))
list_3 <- list(data.frame(M = 1:4, N = 5:8), data.frame(M = 9:12, N = 13:16))
</code>
<code>list_1 <- list(data.frame(A = 1:3, B = 4:6), data.frame(A = 7:9, B = 10:12))
list_2 <- list(data.frame(X = 1:2, Y = 3:4), data.frame(X = 5:6, Y = 7:8))
list_3 <- list(data.frame(M = 1:4, N = 5:8), data.frame(M = 9:12, N = 13:16))
</code>
list_1 <- list(data.frame(A = 1:3, B = 4:6), data.frame(A = 7:9, B = 10:12))
list_2 <- list(data.frame(X = 1:2, Y = 3:4), data.frame(X = 5:6, Y = 7:8))
list_3 <- list(data.frame(M = 1:4, N = 5:8), data.frame(M = 9:12, N = 13:16))
I would like to turn each of these lists into a dataframe, e.g. here is how I would have done this manually:
<code>list_1 = do.call(rbind.data.frame, list_1)
list_2 = do.call(rbind.data.frame, list_2)
list_3 = do.call(rbind.data.frame, list_3)
</code>
<code>list_1 = do.call(rbind.data.frame, list_1)
list_2 = do.call(rbind.data.frame, list_2)
list_3 = do.call(rbind.data.frame, list_3)
</code>
list_1 = do.call(rbind.data.frame, list_1)
list_2 = do.call(rbind.data.frame, list_2)
list_3 = do.call(rbind.data.frame, list_3)
Is it possible to do this with a for loop? Normally in a for loop, I store the output of each iteration to a list itself, whereas this time I want to make individual data frames.