[R] Defining different objects within a loop
jimdare
jamesdare26 at gmail.com
Fri Jul 31 00:09:00 CEST 2009
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.
More information about the R-help
mailing list