[R] loop and read.table

lefebure tristan lefebure at univ-lyon1.fr
Fri Dec 26 14:34:16 CET 2003


Hi,
I would like to open several tables with a loop, using something like :
-----------------
$ ls
1.txt		2.txt		3.txt		4.txt
$ R
> for (i in 1:4)  tabi<-read.table("i.txt")
Error in file(file, "r") : unable to open connection
In addition: Warning message:
cannot open file `i.txt'
------------------

thanks for any help

Tristan Lefebure




More information about the R-help mailing list