Re^2: Warning in par(args)

Paul Gilbert pgilbert@bank-banque-canada.ca
Thu, 18 Jun 1998 10:41:41 -0400


>I myself am using the (``recommended'' ?) way of
 >work.work1()
 >  on.exit(par(op))
 >  op <- par(xyx = ...,  brd = ...)
 >work.work2()
 >  op <- c(op, par(ghj = ...,  klm = ...))
 >work.work3()
>which can be slightly more tedious but is ``preciser'' and doesn't lead to
>the above error messages.

Martin

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

Also, my initial reaction was that in the above example the on.exit values would
be set to those in effect during work.work2 rather than those in effect during
work.work1. Perhaps this is not the case, as the following example may
illustrate:

> c(list(a="a"), b=2, a=1)$a
[1] "a"
> c(list(a="a"), b=2, a=1)
$a
[1] "a"
$b
[1] 2
$a
[1] 1

Perhaps this is a case where we may want incompatibility with S in order to
enforce good programming and unintentional errors. I cannot think of a case
where I would want a list with two elements having the same name.

Paul Gilbert


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._