A quick primer on terminology before I answer your question:
- The result of
read.csv()
is a data.frame
.
- The result of
lapply()
is a list
.
Thus you now have a list of data frames.
If you can safely assume that the data frames in the list have the same structure (i.e. the same number of columns and the same classes), then you can use rbind()
to combine your list of data frames into a single data.frame
.
To make this easier, you can use do.call()
as follows:
do.call(rbind, ddives)
do.call
constructs a call from the function using the list elements as arguments. If they are named, they are passed as named arguments, otherwise in order (as always in R). In this case you apply rbind
to all of the elements in your list, thus creating a single data.frame
.
This is clearly untested, since I don't have your data. But, in general, do.call
is a useful function for this type of operation.