Sean Davis wrote:
If you simply want read all files in a given directory, you can do something like:

fullpath = "/home/andersm/tmp"
filenames <- dir(fullpath,pattern="*")
pair <- sapply(filenames,function(x) {read.table(paste(fullpath,'/',x,sep=""))})

Slightly off-topic but it is more portable to use the file.path function instead of paste when creating a file name.


______________________________________________
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to