Hello,

I have about 2000 data files which I want to analyse.
The file names are all very similar => 
p"variable1"_t"variable2"_c"variable3".txt
There aren“t so much different variables (about 70) , just different 
combinations of them.
To allow an easy way of handling those data files I was wondering 
whether R is able to do variable-substitution /command-substitution 
similar to shell-programming, so that I could imbed the read.table 
option (and further commands) in 3 loops (one for every variable in the 
filenames) .

e.g.:
for var1 in (varlist1)
 for var2 in (varlist2)
  for var3 in (varlist3)
   read.table("..../p$var1_t$var2_c$var3.txt")
   ....statistics......
  done
 done
done


Cheers,
Damaris

______________________________________________
[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