search for: laegeren

Displaying 2 results from an estimated 2 matches for "laegeren".

2002 Jan 22
1
creation of objects
...'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=FALSE, full.names=FALSE) 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 f...
2002 Jan 22
3
assigning NA's
I've had a question a few moments ago about how to create multiple objects from multiple files within a loop. Thanks for the quick answers, it worked with "assign", like this: for(i in seq(1,nfn,1)){ fin<-paste("/home/klimet/patrick/LAEGEREN/NEBEL/FOGEVENT2000/",fn[i],sep="") assign(paste("f", i, sep = ""), as.matrix(read.table(fin,skip=1))) } I've tried to use the same command for assigning NA's to missing values (=-999) in each object created with above loop, like this: for(i in seq(1,nf...