Re: [Rd] '==' operator: inconsistency in data.frame(...) == NULL

2019-09-25 Thread Martin Maechler
> Hilmar Berger > on Tue, 24 Sep 2019 19:31:51 +0200 writes: > Dear Martin, > thanks a lot for looking into this. Of course you were right that the > fix was not complete - I apologize for not having tested what I believed > to be the solution. > My comments on

Re: [Rd] '==' operator: inconsistency in data.frame(...) == NULL

2019-09-24 Thread Hilmar Berger
Dear Martin, thanks a lot for looking into this. Of course you were right that the fix was not complete - I apologize for not having tested what I believed to be the solution. My comments on the S4 classes seemed to stem from a misunderstanding on my side. I now believe to understand that S4

Re: [Rd] '==' operator: inconsistency in data.frame(...) == NULL

2019-09-18 Thread Martin Maechler
> Martin Maechler > on Wed, 18 Sep 2019 10:35:42 +0200 writes: > Hilmar Berger > on Sat, 14 Sep 2019 13:31:27 +0200 writes: >> Dear all, >> I did some more tests regarding the == operator in Ops.data.frame (see >> below).  All tests done in R 3

Re: [Rd] '==' operator: inconsistency in data.frame(...) == NULL

2019-09-18 Thread Martin Maechler
> Hilmar Berger > on Sat, 14 Sep 2019 13:31:27 +0200 writes: > Dear all, > I did some more tests regarding the == operator in Ops.data.frame (see > below).  All tests done in R 3.6.1 (x86_64-w64-mingw32). > I find that errors are thrown also when comparing a zero len

Re: [Rd] '==' operator: inconsistency in data.frame(...) == NULL

2019-09-14 Thread Hilmar Berger
Dear all, I did some more tests regarding the == operator in Ops.data.frame (see below).  All tests done in R 3.6.1 (x86_64-w64-mingw32). I find that errors are thrown also when comparing a zero length data.frame to atomic objects with length>0 which should be a valid case according to the d

Re: [Rd] '==' operator: inconsistency in data.frame(...) == NULL

2019-09-11 Thread Hilmar Berger
Sorry, I can't reproduce the example below even on the same machine. However, the following example produces the same error as NULL values in prior examples: > setClass("FOOCLASS", +  representation("list") + ) > ma = new("FOOCLASS", list(M=matrix(rnorm(300), 30,10))) > isS4(ma) [1] TRU

Re: [Rd] '==' operator: inconsistency in data.frame(...) == NULL

2019-09-11 Thread Hilmar Berger
Another example where a data.frame is compared to (here non-null, non-empty) non-atomic values in Ops.data.frame, resulting in an error message: setClass("FOOCLASS2", slots = c(M="matrix") ) ma = new("FOOCLASS2", M=matrix(rnorm(300), 30,10)) > isS4(ma) [1] TRUE > ma == data.frame(a=1:

Re: [Rd] '==' operator: inconsistency in data.frame(...) == NULL

2019-09-11 Thread Hilmar Berger
Dear Martin, On 11/09/2019 09:56, Martin Maechler wrote: > > > I wonder if data.frame() == NULL should also > return > > a value instead of an error. R help reads: > > > "At least one of |x| and |y| must be an atomic vector, but > > if the other is a list R attempts to c

Re: [Rd] '==' operator: inconsistency in data.frame(...) == NULL

2019-09-11 Thread Martin Maechler
> Hilmar Berger > on Wed, 4 Sep 2019 15:25:46 +0200 writes: > Dear all, > I just stumbled upon some behavior of the == operator which is at least > somewhat inconsistent. > R version 3.6.1 (2019-07-05) -- "Action of the Toes" > Copyright (C) 2019 The R Foundatio

[Rd] '==' operator: inconsistency in data.frame(...) == NULL

2019-09-04 Thread Hilmar Berger
Dear all, I just stumbled upon some behavior of the == operator which is at least somewhat inconsistent. R version 3.6.1 (2019-07-05) -- "Action of the Toes" Copyright (C) 2019 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 (64-bit) > list(a=1:3, b=LETTERS[1:3]) ==