Skip to content
Prev 6062 / 63468 Next

Wierd problem comparing numeric values and list using == (PR#1073)

gregory_r_warnes@groton.pfizer.com writes:
It is not entirely clear what we *should* be doing here. S (-PLUS 3.4)
is at least consistent:
Error in list(1) == list(1): == operation on mode "list" undefined
Dumped
Error in 1 == list(1): == operation on mode "list" undefined
Dumped
Error in as.integer(1) == list(as.integer(1)): == operation on mode "list"
        undefined
Dumped
...

so one might argue that you shouldn't do that in the first place...
(or that the bug is that we do not expressly forbid doing this.)

        -p