Warning in par(args)

Martin Maechler Martin Maechler <maechler@stat.math.ethz.ch>
Wed, 24 Jun 1998 10:47:51 +0200


>>>>> "PaulG" == Paul Gilbert <pgilbert@bank-banque-canada.ca> writes:

    MM> I myself am using the (``recommended'' ?) way of
    MM>    work.work1()
    MM>    on.exit(par(op))
    MM>    op <- par(xyx = ...,  brd = ...)
    MM>    work.work2()
    MM>    op <- c(op, par(ghj = ...,  klm = ...))
    MM>    work.work3()

    MM> which can be slightly more tedious but is ``preciser'' and
    MM> doesn't lead to the above error messages.

    PaulG> Could you please explain the more precise nature of this and why
    PaulG> it doesn't give the error message. I typically use
    PaulG> on.exit(par(op)), but perhaps not everywhere.  Is it on.exit
    PaulG> that prevents the message?

No, it's not the on.exit;
it's the fact the I don't put the *whole* par() into op but rather only
the parts which I change;
e.g.
	> op <- par(mfrow= c(2,2))
	> op
	$mfrow:
	[1] 1 1

Therefore, a later  par(op)  [called by on.exit(.)] only calls par(.) with
arguments that make sens to be changed.

Martin
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._