duplicated.data.frame {was "[R] which rows are duplicates?"}
Martin Maechler wrote:
WK> what the documentation *fails* to tell you is that the parameter
WK> 'incomparables' is defunct
No, not "defunct", but the contrary of it,
"not yet implemented" !
that's my bad english, again. sorry.
WK> # data as above, or any data frame
WK> duplicated(data, incomparables=NA)
WK> # Error in if (!is.logical(incomparables) || incomparables)
WK> .NotYetUsed("incomparables != FALSE") :
WK> # missing value where TRUE/FALSE needed
WK> the error message here is *confusing*.
yes!
!
WK> the error is raised because the
WK> author of the code made a mistake and apparently haven't carefully
((plural or singular ??))
i guess "hasn't" was intended. i'd need to ask the author.
WK> examined and tested his product; the code goes: ((aah, ... "singular" ...))
my guesswork, anyway.
WK> duplicated.data.frame
WK> # function (x, incomparables = FALSE, fromLast = FALSE, ...)
WK> # {
WK> # if (!is.logical(incomparables) || incomparables)
WK> # .NotYetUsed("incomparables != FALSE")
WK> # duplicated(do.call("paste", c(x, sep = "\r")), fromLast = fromLast)
WK> # }
WK> # <environment: namespace:base>
WK> clearly, the intention here is to raise an error with a (still hardly
WK> clear) message as in:
WK> .NotYetUsed("incomparables != FALSE")
WK> # Error: argument 'incomparables != FALSE' is not used (yet)
WK> but instead, if(NA) is evaluated (because '!is.logical(NA) || NA'
WK> evaluates, *obviously*, to NA) and hence the uninformative error message.
WK> take home point: rtfm, *but* don't believe it.
and then be helpful to the R community and send a bug report
*with* a patch if {as in this case} you are able to...
Well, that' no longer needed here,
I'll fix that easily myself.
but i *have* sent a patch already! vQ