I have a list of lists that looks like this: x[[state]][[year]]
. Each element of this is a data frame, and accessing them individually is not a problem.
However, I'd like to rbind data frames across multiple lists. More specifically, I'd like to have as output as many dataframes as I have years, that is rbind all the state data frames within each year. In other words, I'd like to combine all my state data, year by year, into separate data frames.
I know that I can combine a single list into a data frame with do.call("rbind",list)
. But I don't know how I can do so across lists of lists.
Thanks for any help!