Q:

how to keep a large number of data.frame in .csv

There are a large number of data.frame (more than 50). How can I save them quickly in .csv?
write.csv()

50 lines of code, it's awful...
Help me, guys!

A:

If I understand the many data.frames may be available in in your R session...
First create a vector with the names of the data.frames... use ls or some thing similar. Then use get to get the R object after the names (the data.frames in this case)
myfiles <- ls ()

Then
for (d in myfiles) {
    current <- get (d)
    write.csv (current, filename = paste0 (d, ".csv"))
}

