[R] Automatic File Reading

Scionforbai scionforbai at gmail.com
Wed Oct 18 18:04:21 CEST 2006


Just to complete: if you need them all at the same time:

for(i in 1:100)
{
  fn <- paste("velocity",i,".txt",sep="")
  varname <- paste("velocity",i,sep="")
  assign(varname,read.csv(fn))
}

and you have a list of objects {velocity1, ..., velocity100} with
corresponding data.

Scionforbai



More information about the R-help mailing list