Re: R-alpha: Rv0.13: bug in abline or par2?

Ross Ihaka (ihaka@stat.auckland.ac.nz)
Wed, 13 Nov 1996 13:40:06 +1300 (NZDT)


From: Ross Ihaka <ihaka@stat.auckland.ac.nz>
Date: Wed, 13 Nov 1996 13:40:06 +1300 (NZDT)
Message-Id: <199611130040.NAA27230@stat13.stat.auckland.ac.nz>
To: Thomas Lumley <thomas@biostat.washington.edu>
Subject: Re: R-alpha: Rv0.13: bug in abline or par2?
In-Reply-To: <Pine.SUN.3.91.961108091828.20520B-100000@chekov>
	<Pine.SUN.3.91.961108091828.20520B-100000@chekov>

Thomas Lumley writes:
 > On Fri, 8 Nov 1996, Anthony Ledford wrote:
 > > However, in R v 0.13 I get the following:
 > > 
 > >  plot(1:10)
 > >  abline(h=5)
 > > Error in par2(args) : parameter "1em" is not setable
 > >  abline(v=5)
 > > Error in par2(args) : parameter "1em" is not setable
 > > 

I think that replacing the function par2 in the file
		src/library/base/par
with the following will do the trick (I borrowed too much of the
original "par").

	par2 :=
	function (...)
	{
	 .Internal(par2(list(...)))
	}

The changes produced by par are permanent, those produced by par2 are
in effect only until the start of the next plot.  This is the mechanism
which is used for temporary changes to par values like lty/cex etc
in calls to functions like plot/hist etc.
	Ross
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
r-testers mailing list -- To (un)subscribe, send
subscribe	or	unsubscribe
(in the "body", not the subject !)  To: r-testers-request@stat.math.ethz.ch
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-