I have a function that outputs a large matrix (Mat1) and a small dataframe (Smalldf1) I store them in a list called "Result". This function is run inside a loop so I create many versions of my "Result" list until my loop ends....each time I add them to a list called "FINAL".
At the end of my loop I end up with a List called FINAL, that has many smaller "Result" lists inside...each containing a small dataframe and a large Matrix.
I want to rbind all of the small dataframes together to form one larger dataframe and call it DF1 - I'm not sure how I access these now that I'm accessing a list within a list..?
A similar question on here gave a solution like this:
DF1 <- do.call("rbind",lapply(FINAL, function(x) x["Smalldf1"]))
However this gives the output as a single column called "Smalldf1" with the description of Smalldf1...ie this is literally printed in the column list(X1="xxx", X2="xxx", X3="xxx")...I need this broken out to look like the original format, 3 columns housing the information...?
Any help would be great.