Re: [R] batch process file in R

2009-03-12 Thread Derek Norton
If these are the only files in the directory, then you might try... (File paths will need to change if the folder "200209" isn't in the working directory) fpath <- "./200209" a <- list.files(fpath) for(i in 1:length(a)){ assign(paste("y",i,sep=""),read.table(paste(fpath,a[i],sep="/"))) } Ano

Re: [R] batch process file in R

2009-03-12 Thread Jorge Ivan Velez
Dear Ted, Try this: # Working directory -- files are located here setwd("C:\\200209") # Names of the files Files<-c( paste("BA02090",c(2:6,9),".txt",sep=""), paste("BA0209",c(10:13,16:20,23:27,30),".txt",sep=""), "GMAS0209.txt","MAST0209.txt" ) Files # Reading the files into R Re

Re: [R] batch process file in R

2009-03-12 Thread Romain Francois
tedzzx wrote: Dear R experts, I have a folder names "200209" and in this folder there are many data files, such as: "BA020902.txt","BA020903.txt","BA020904.txt", "BA020905.txt","BA020906.txt","BA020909.txt", "BA020910.txt","BA020911.txt","BA020912.txt", "BA020913.txt","BA020916.txt","BA020917.

[R] batch process file in R

2009-03-12 Thread tedzzx
Dear R experts, I have a folder names "200209" and in this folder there are many data files, such as: "BA020902.txt","BA020903.txt","BA020904.txt", "BA020905.txt","BA020906.txt","BA020909.txt", "BA020910.txt","BA020911.txt","BA020912.txt", "BA020913.txt","BA020916.txt","BA020917.txt", "BA020918.