Skip to content
Prev 292930 / 398500 Next

Batch importing data

list.files() will give you all the file names in your working
directory (you can also give it a pattern argument) then can loop over
those with something like:

lapply(list.files(), read.table)

which will put all your files in a list object. This is generally
considered much more convenient than trying to create a whole bunch of
objects with different names programmatically.

Michael
On Fri, Apr 27, 2012 at 11:23 AM, jiangxijixzy <jiangxijixzy at 163.com> wrote: