[R] how to load files from a directory?

Arnau Mir arnau.mir at uib.es
Sun Mar 12 11:50:32 CET 2006


Hello.

I have a lot of files that contain tables of data in a directory.
I want to do the following in R but I don't know how:

for i in 1 to the number of files
{
   table[i]=read.table(file="file i")
}

The dimension of each table is different. All of these are tables of two
dimensions.

My first problem is to put all the file names in a table.
Next, how I can load them using the command:
read.table(file="file i") ?


Thank in advance for your help,

Arnau.




More information about the R-help mailing list