Hi,

I'm new to R and want to use it to analyse a number of data files (e.g.
100).
I want to read in multiple files in a loop in a specific order (e.g. 1 to
100) and was hoping to do something like:

for (r in 1:100) {
 d1 <-read.table(r.anl)
  for (r2 in 1:100) {
   d2 <-read.table(r2.anl)
    cc <-cor(d2,d1)
 }

>From my basic understanding of R,  it requires "" in read.table and so, r
and r2 would not be substituted.
Is there a better way to read in multiple files in an order that preserves
"numerical" order (e.g. 1.anl, 2.anl, 3.anl, 4.anl etc)?

Thanks!

ZT

	[[alternative HTML version deleted]]

