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