I have a list containing data frames as its elements in R.
Example:
df1 <- data.frame("names"=c("John","Sam","Dave"),"age"=c(21,22,25)) df2 <- data.frame("names"=c("John","Sam"),"score"=c(22,25)) df3 <- data.frame("names"=c("John","Sam","Dave"),"country"=c("US","SA","NZ")) mylist <- list(df1,df2,df3) Is it possible to merge all the elements of mylist together without using a loop?
My desired output for this example is:
names age score country 1 John 21 22 US 2 Sam 22 25 SA The list in this example has only three elements; however, I am looking for a solution that can handle an arbitrary number of elements.