[R] Import multiple files into R

ajaykumar ajayku at ncsu.edu
Thu Mar 20 06:15:28 CET 2014


Hi I want to import around 75 files. Each file has a name and a time and is
comma separated.
For example some of my file names are
Asheville_Dec.txt
Asheville_Jan.txt
Asheville_Feb.txt
Charlotte_Dec.txt
Chapelhill_Jan.txt

The time months are only Dec Jan and Feb. The locations are different. I
have data for these 3 months at 25 cities which I want to import in R
I don't want to use read.table 75 times and keep changing names.

Is there any way I can keep all the city names in an object and the three
months in another object
and then use a loop over read.table of location_time.txt
I would also like to view them as 75 different data sets in R
So the file Asheville_Dec must be in a dataset called Asheville_Dec in R

Can this be done.
Please help



--
View this message in context: http://r.789695.n4.nabble.com/Import-multiple-files-into-R-tp4687178.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list