RobinHankin / frab

1 stars 0 forks source link

sparsetable comparison methods not well documented #26

Closed RobinHankin closed 6 months ago

RobinHankin commented 6 months ago

Just looking at issue #25 it is not clear why a ==3 returns a disord object and not some kind of Boolean sparsetable. At least, the Rd files don't make this clear.

RobinHankin commented 6 months ago

Just noticed that comparing a sparsetable object with zero is odd:

library("frab")
#> 
#> Attaching package: 'frab'
#> The following objects are masked from 'package:base':
#> 
#>     pmax, pmin
(x <- rspar2())
#>    bar
#> foo  A  B  C  D  F
#>   a  0 25  0 27  0
#>   b  0  0 11  9 23
#>   d 10  3  0  7  0
#>   e  0  0  4  1  0
x == 0
#> A disord object with hash 89f823ace6f1fa22a0dfb516fb2df2b8bd59850c and elements
#>  [1] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
#> (in some order)

(Of course, each entry of the result is FALSE, but this is not immediately obvious, and certainly not documented adequately).