On Fri, 25 May 2012, HJ YAN wrote:
Is there any claver way that I do not have to type in all these hundreds names by hand, maybe using a R package or write some code in some other languages if it is not too difficult to learn.
I'd put the list of commands in a shell script; e.g., # import_files.R read_csv("file1.csv", header = T, sep = ',') read_csv("file2.csv", header = T, sep = ',') etc. Then, within a R session, run source("/full/path/to/import_files.R") or, on the command line, R CMD BATCH /full/path/name/to/import_files.R You'll still need to list all the files individually unless you use a loop. I've not tried that so someone more experienced will advise you on that. Rich ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.