Using R 1.6.1 on Windows 2000. The graphics history stored for the windows() device can be cleared using the menu system of rgui for Windows. Is there a corresponding R function that can be called from a script to clear the history? -- Michael Prager, Ph.D. <Mike.Prager at noaa.gov> NOAA Center for Coastal Fisheries and Habitat Research Beaufort, North Carolina 28516 http://shrimp.ccfhrb.noaa.gov/~mprager/
.SavedPlots <- NULL On Tue, 24 Dec 2002, Mike Prager wrote:> Using R 1.6.1 on Windows 2000. > > The graphics history stored for the windows() device can be cleared using > the menu system of rgui for Windows. Is there a corresponding R function > that can be called from a script to clear the history?-- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
Either I am being especially absent-minded today, or setting .SavedPlots <- NULL does not work as expected. Am I missing something, or should I send this to R-bugs? > .SavedPlots NULL yet after bringing up the windows() device, it still has plots stored. Also, after generating additional plots (that are recorded), .SavedPlots is still NULL. ...MHP At 12/24/2002 at 11:46 AM, Brian D. Ripley wrote:>.SavedPlots <- NULL > >On Tue, 24 Dec 2002, Mike Prager wrote: > > > Using R 1.6.1 on Windows 2000. [...] Is there a [...] function > > that can be called from a script to clear the [graphics] history?-- Michael Prager, Ph.D. <Mike.Prager at noaa.gov> NOAA Center for Coastal Fisheries and Habitat Research Beaufort, North Carolina 28516 http://shrimp.ccfhrb.noaa.gov/~mprager/
On Tue, 24 Dec 2002, Mike Prager wrote:> Either I am being especially absent-minded today, or setting .SavedPlots > <- NULL does not work as expected. Am I missing something, or should I > send this to R-bugs?Well, first you have to establish that there *is* a bug in R rather than in your expectations. All the clear menu does is gsetVar(install(".SavedPlots"), R_NilValue, R_NilValue); which sets .SavedPlots to NULL in base. So you may need> assign(".SavedPlots", NULL, "package:base")You are missing reading src/gnuwin32/devga.c: I was being far too kind in reading it for you. -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595