Skip to content
Prev 162383 / 398500 Next

sequencially merge multiple files in a folder

If you know how to merge 2 of the files together, then you can use the Reduce function to do the merging of multiple files.

You could use lapply to read all of the files into a list, then Reduce to merge them together, then output the result to a new file if a file is really what you want.

Another approach may be to use one of the database packages and an sql query to merge everything together.

Hope this helps,

--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.snow at imail.org
801.408.8111