How can I output a list of data frames to a csv file so that they are listed vertically?

I have a list of data frames in R that I would like to output to a csv file, with the data frames listed vertically in the csv file. The output command that I tried is this:

write.csv(model_diagnostic_list, "Model diagnostics.csv")

However, the resulting csv file has the data frames all lined up horizontally, which doesn't look good.

dplyr::bind_rows() supports data.frames in a list as a possible argument.
The first time you will need to

install.packages("dplyr") 

then in any news session of work where you want to use the functionality

library(dplyr)
#an examples from built in iris dataset
bind_rows(list(head(iris),tail(iris)))

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.