I've forgotten to submit this as bug report
(and haven't easily seen how to debug).
The bug is both for is.na() and is.nan() {which makes much sense since
the C code of the two is very similar!};
only one is shown below.
Martin
------- start of forwarded message -------
From: Martin Maechler <maechler@stat.math.ethz.ch>
To: R-core@stat.math.ethz.ch
Subject: another is.nan BUG found by gctorture-testing demo(is.things)
Date: Thu, 12 Apr 2001 14:51:06 +0200
demo() being part of strict tests (since this morning),
reveals another bug in is.nan()
in both branches, but already in 1.2.2
(ie. certainly not caused by Peter's recent fix) :
gctorture(FALSE) # default
is.nan(NULL)
#-> logical(0)
gctorture()
is.nan(NULL)
Looks pretty strange : {calling it subsequently does sometimes not reproduce}
> gctorture()
> is.nan(NULL)
$names
[1] "is.nan() applied to non-(list or vector)"
[2] ""
[3] ""
[4] ""
[5] ""
[6] ""
[7] ""
[8] ""
[9] ""
[10] ""
[11] ""
[12] ""
[13] ""
[14] ""
[15] ""
[16] ""
[17] ""
[18] ""
[19] ""
[20] ""
[21] ""
[22] ""
[23] ""
[24] ""
[25] ""
[26] ""
[27] ""
[28] ""
[29] ""
[30] ""
[31] ""
[32] ""
[33] ""
[34] ""
[35] ""
[36] ""
[37] ""
[38] ""
[39] ""
[40] ""
[41] ""
[42] ""
[43] ""
[44] ""
[45] ""
[46] ""
[47] ""
[48] ""
[49] ""
[50] ""
Warning message:
is.nan() applied to non-(list or vector) in: is.nan(NULL)
>
------- end of forwarded message -------
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
On Mon, 28 May 2001 maechler@stat.math.ethz.ch wrote:> I've forgotten to submit this as bug report > (and haven't easily seen how to debug). > > The bug is both for is.na() and is.nan() {which makes much sense since > the C code of the two is very similar!}; > only one is shown below.I think I've found it - I'll do a bit more testing. Incidentally, on my machine if you do gctorture() is.nan(NULL) is.nan(NULL) is.nan(NULL) ... it happens precisely on the second invocation. -thomas> > Martin > > ------- start of forwarded message ------- > From: Martin Maechler <maechler@stat.math.ethz.ch> > To: R-core@stat.math.ethz.ch > Subject: another is.nan BUG found by gctorture-testing demo(is.things) > Date: Thu, 12 Apr 2001 14:51:06 +0200 > > demo() being part of strict tests (since this morning), > reveals another bug in is.nan() > in both branches, but already in 1.2.2 > (ie. certainly not caused by Peter's recent fix) : > > gctorture(FALSE) # default > is.nan(NULL) > #-> logical(0) > > gctorture() > is.nan(NULL) > > Looks pretty strange : {calling it subsequently does sometimes not reproduce} > > > gctorture() > > is.nan(NULL) > $names > [1] "is.nan() applied to non-(list or vector)" > [2] "" > [3] "" > [4] "" > [5] "" > [6] "" > [7] "" > [8] "" > [9] "" > [10] "" > [11] "" > [12] "" > [13] "" > [14] "" > [15] "" > [16] "" > [17] "" > [18] "" > [19] "" > [20] "" > [21] "" > [22] "" > [23] "" > [24] "" > [25] "" > [26] "" > [27] "" > [28] "" > [29] "" > [30] "" > [31] "" > [32] "" > [33] "" > [34] "" > [35] "" > [36] "" > [37] "" > [38] "" > [39] "" > [40] "" > [41] "" > [42] "" > [43] "" > [44] "" > [45] "" > [46] "" > [47] "" > [48] "" > [49] "" > [50] "" > > Warning message: > is.nan() applied to non-(list or vector) in: is.nan(NULL) > > > ------- end of forwarded message ------- > > -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- > 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 > _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._ >Thomas Lumley Asst. Professor, Biostatistics tlumley@u.washington.edu University of Washington, Seattle ^^^^^^^^^^^^^^^^^^^^^^^^ NOTE NEW EMAIL ADDRESS -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._