Grokbase Groups R r-help January 2002
FAQ
Hi there,

I'm a new R user and I've got a little problem:
I would like to read several files at once (which works) and create R
objects for each individual file (which doesen't work) within a loop:
this is the way I've tried to program this:

fn<-list.files(path "/home/klimet/patrick/LAEGEREN/NEBEL/FOGEVENT2000/", pattern=NULL,
all.filesúLSE, full.namesúLSE)
for(i in seq(1,nfn,1)){

fin<-paste("/home/klimet/patrick/LAEGEREN/NEBEL/FOGEVENT2000/",fn[i],sep="")

fi <- as.matrix(read.table(fin,skip=1))
}

The i in fin and fi should create new objects for every loop with i
being the number, like f1, f2,f3 and so on. The way I did it, it reads
i as a character and overwrites the object in every loop.

Thanks for any hints....

Patrick
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patrick.vcf
Type: text/x-vcard
Size: 339 bytes
Desc: Card for Patrick Buetzberger
Url : https://stat.ethz.ch/pipermail/r-help/attachments/20020122/a47b51b7/patrick.vcf

Search Discussions

Discussion Posts

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 2 | next ›
Discussion Overview
groupr-help @
categoriesr
postedJan 22, '02 at 3:38p
activeJan 22, '02 at 3:51p
posts2
users2
websiter-project.org
irc#r

People

Translate

site design / logo © 2017 Grokbase