> I often find myself (wanting t)o constructing lists or > data.frames:
Try something like fl<-list() for (ix in id) { fl[[basename(ix)]] <- list.files(ix) } But read R Inferno on inrementing objects first. It isn't efficient in memory terms (unless that's improved in recent versions of R) Rather more elegantly you can get the same list with sapply(id, function(ix) list.files(ix)) ******************************************************************* This email and any attachments are confidential. Any use...{{dropped:8}} ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.