[R] Warning calling par

Prof Brian Ripley ripley at stats.ox.ac.uk
Mon Nov 24 21:33:09 CET 2003

On Mon, 24 Nov 2003, "Wiklund, Pär" wrote:

> Hi. I have a function that works well under R 1.7.1 But under 1.8.0 and 1.8.1 I get:Warning message: 
> calling par(new=) with no plot
> And it doesnt plot

And your point is?  Your code was incorrect, and now your error is
detected.  Why are you calling close.screen:

     'close.screen' removes the specified screen definition(s).

when you have not specified any?

Such code produced invalid output on e.g. postscript() and pdf() devices
in the past, and the error is now trapped.

> The function is:
> mplotmeth1<-function(data1,data2,alpha,nr){
> 	psfile<-paste("Meth1_",nr[1],"-",nr[length(nr)],".ps",sep="")
> 	postscript(psfile)
> 	close.screen(all=T)


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

More information about the R-help mailing list