[Rd] bug in rect (PR#9307)
Joseph Voelkel
jgvcqa at rit.edu
Fri Oct 20 02:37:45 CEST 2006
Thanks. I'll just get out of your way at this point.
Joe
-----Original Message-----
From: Duncan Murdoch [mailto:murdoch at stats.uwo.ca]
Sent: Thursday, October 19, 2006 7:42 PM
To: Peter Dalgaard
Cc: R-bugs at biostat.ku.dk; r-devel at stat.math.ethz.ch; Joseph Voelkel;
Deepayan Sarkar
Subject: Re: [Rd] bug in rect (PR#9307)
On 10/19/2006 7:22 PM, Peter Dalgaard wrote:
> Duncan Murdoch <murdoch at stats.uwo.ca> writes:
>
>> On 10/19/2006 5:34 PM, jgvcqa at rit.edu wrote:
>>> Full_Name: Joe Voelkel
>>> Version: 2.4.0
>>> OS: Windows XP
>>> Submission from: (NULL) (129.21.11.37)
>>>
>>>
>>> Using "border=NA" in the call to rect generates an error. But the
help file says
>>> border=NA is acceptable.
>>>
>>> (The problem is that border=NA evaluates to TRUE for
"is.logical(border)" inside
>>> the function. Using rect with border=FALSE works fine)
>> I don't see this. Could you post some code to illustrate?
>
> He should, but it is actually plain to see in the code:
>
> if (!is.null(density) && !is.null(angle)) {
> if (is.logical(border)) {
> if (border)
> border <- col
> else border <- NA
> }
>
> so it requires non-default density and angle to bite. The code should
> probably read
>
> ...
> if(!is.na(border) && is.logical(border))
> ...
>
Right. Looks like there might be a similar bug lurking in lpolygon and
lrect in lattice, so I'm cc'ing Deepayan.
Are you fixing rect?
Duncan Murdoch
More information about the R-devel
mailing list