Lara Poplarski <larapoplar...@gmail.com> [Wed, Nov 24, 2010 at 06:14:58PM CET]:
> for (K in ...){ > > ... create object ... > > topDirName <- as.character(paste("topName", K, sep="")) > topDirMake <- dir.create(topDirName) You may want to insert setwd(topDirName) here. > > for (L in ...) { > > subDirName <- as.character(paste("subName", L, sep="")) > subDirMake <- dir.create(subDirName) and setwd(subDirName) here. > > ... manipulate object ... > > for (M in ...) { > > objectName <- as.character(paste("objName", M, ".pdf", sep="")) > > pdf(objectName) > plot(object) > dev.off() > } and, accordingly, setwd("..") here > } and here > } > -- Johannes Hüsing There is something fascinating about science. One gets such wholesale returns of conjecture mailto:johan...@huesing.name from such a trifling investment of fact. http://derwisch.wikidot.com (Mark Twain, "Life on the Mississippi") ______________________________________________ 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.