[R] Automated figure production

Sergey Goriatchev sergeyg at gmail.com
Mon Feb 26 09:14:17 CET 2007


Hello, everybody

Two questions:

1) I am new to maillists, and particularly to r-help maillist. Where
specifically do I go online to see my question and answers to it??? If
I use the searchable archives, or archives by Robert King, I see my
question but not the answers, though I know that at least one persion
posted the answer to r-help. Why do not I see the answers?

2)

I need to produce 104 figures. In each graphic window I want to plot 8
figures. How do I automate the process so that it opens 13 separate
graphic windows in R Gui and plots the figures? (I then paste them in
Word, one by one). Also, how do I save all 104 figures to one PDF
file?

Here is the code to produce the figures, and at this point I change
the j-index in the for-loop by hand, produce 8 figures, copy them to
Word, then change j to 9:16 etc...

#HOW TO PRODUCE ALL 104 GRAPHS AT ONCE

old.par<-par(no.readonly=TRUE)
par(mfrow=c(4,2))

for(j in 1:8) {
plot(Cleaned[zz[,j],4], type="b", main=long.names[j], xlab="Month",
ylab="MFR", col="blue")
abline(h=0, col="red")
}
par(old.par)


Thanks for your help!
Sergey

-- 
Laziness is nothing more than the habit of resting before you get tired.
- Jules Renard (writer)

Experience is one thing you can't get for nothing.
- Oscar Wilde (writer)

When you are finished changing, you're finished.
- Benjamin Franklin (President)



More information about the R-help mailing list