Re: [R] redirect plot device automatically

2008-01-03 Thread Prof Brian Ripley
This seems rather complicated. From ?png note that just using png("myoutput%03d.png") will cause each subsequent graphics page to generate a separate PNG file. (It 'redirects' as asked for, not copies from the screen.) On Thu, 3 Jan 2008, jim holtman wrote: > I have used a function like this t

Re: [R] redirect plot device automatically

2008-01-03 Thread jim holtman
I have used a function like this to capture the output on the terminal to a file: f.plot <- local({ # this will make PlotNumber 'local' (private) PlotNumber <- 1 # initialize the plot number (known just to this function) return(function(){ # returns the 'function' as the result dev

[R] redirect plot device automatically

2008-01-03 Thread Milton Cezar Ribeiro
Dear all, Every time that I need to generate I plot output as figure I use something like png("myoutput.png") plot(rnorm(100)*1.0,col=4) points(rnorm(100)*0.5,col=2,pch=0) dev.off() But now I need to generate a lot of outputs and it could not be done in a for looping where I can change the name