Dear R Users, I have a dataset that I have split by group. For each group I plot a figure using:
for (i in splitdf){ plot<-xyplot(................) print(plot) savePlot(filename=paste(i$Group[1]),type="pdf") } This gives me X pdf files where X is the number of groups. Does anyone know a simple way to get the name of the plot [plot<-xyplot()] to differ for each rin of the loop so I can merge them into a single pdf files using. pdf(filename="mergedplots") plot1 .... plotX dev.off() Thanks in advance, James -- View this message in context: http://www.nabble.com/Defining-different-objects-within-a-loop-tp24748164p24748164.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ 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.