[R] Graphic Device - View/get all graphics

MarcioRibeiro mestat at pop.com.br
Fri Nov 27 18:10:07 CET 2009


Hello,
After some research, I didn't resolve my doubt yet...
Maybe I didn't explain very well my question... So, I have a bootstrap
simulation, but suppose just a simple part of my function:

teste <-function(x){
rw_mean_app<-rnorm(x, mean = 10, sd = 2)
rwy_mean_app<-rnorm(x, mean = 10, sd = 2)
rw_median_app_ori<-rnorm(x, mean = 10, sd = 2)
rw_median_app_mod<-rnorm(x, mean = 10, sd = 2)

histogram<-par(mfrow=c(1,2),ask=TRUE)
hist(rw_mean_app,main='Method RWOriginal',xlab='Mean',ylab=' ')
hist(rwy_mean_app,main='Method RWY',xlab='Mean',ylab=' ')
par(histogram)

histogram<-par(mfrow=c(1,2) ,ask=TRUE)
hist(rw_median_app_ori,main='Method RWOriginal',xlab='Median',ylab=' ')
hist(rw_median_app_mod,main='Method RWModified',xlab='Median',ylab=' ')
par(histogram)

}   #END OF FUNCTION
GRAF<-teste(100)

I cannot save rnorm objects in a list cause they are distribution from 1000
simulation... So, I would like to produce the graphics in my function and
find out a way that I could save the graphics... I can save the object using
the LIST procedure, but I dont know how I save an object that is a
graphic...
Listers, I just want some advices in order to make a research about what
functions of R I could save the graphics in my function...
Thanks again,
Marcio




MarcioRibeiro wrote:
> 
> Hi Listers,
> I am producing some graphics that the commands are in a FUNCTION...
> The problem is that I end up viewing just last graphic and in my FUNCTION
> there are 4 graphics with the PAR command function... Like those below...
> How do I view/get the other 3 graphics? Any help?
> Thanks in advance...
> 
> histogram<-par(mfrow=c(1,2))
> hist(rw_mean_app,main='Bootstrap Method RWOriginal',xlab='Mean',ylab=' ')
> hist(rwy_mean_app,main='Bootstrap Method RWY',xlab='Mean',ylab=' ')
> par(histogram)
> 
> histogram<-par(mfrow=c(1,3))
> hist(rw_median_app_ori,main='Bootstrap Method
> RWOriginal',xlab='Median',ylab=' ')
> hist(rw_median_app_mod,main='Bootstrap Method
> RWModified',xlab='Median',ylab=' ')
> hist(rwy_median_app,main='Bootstrap Method RWY',xlab='Median',ylab=' ')
> par(histogram)
> 
> 

-- 
View this message in context: http://old.nabble.com/Graphic-Device---View-get-all-graphics-tp26498560p26545221.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list