I have a dataset which is a list containing 1000 items that are data frames. I want to unlist these data frames using a loop such that the end result is one large data frame with each element of the data set stacked upon one another. I've made a jovial example below:
list1 <- data.frame(x = c("hello","bye"), y = c(1, 4), z = c(TRUE, FALSE))
list2 <- data.frame(x = c("bye","hello"), y = c(5, 8), z = c(FALSE, FALSE))
fulllist <- list(list1, list2)
As mentioned above I'm wanting to make 'fulllist' into a data frame using a loop as seen below. Thanks in advance
x | y | z |
---|---|---|
hello | 1 | TRUE |
bye | 4 | FALSE |
bye | 5 | FALSE |
hello | 8 | FALSE |