[Rd] duplicated.data.frame {was "[R] which rows are duplicates?"}

Martin Maechler maechler at stat.math.ethz.ch
Tue Mar 31 17:55:38 CEST 2009


>>>>> "WK" == Wacek Kusnierczyk <Waclaw.Marcin.Kusnierczyk at idi.ntnu.no>
>>>>>     on Tue, 31 Mar 2009 16:03:12 +0200 writes:

    WK> Martin Maechler wrote:

[................]

    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.
    >> 

    WK> but i *have* sent a patch already!

Ok, I believe you.  But I think you did not mention that during
this thread, ... and/or I must have overlooked your patch.

In any case the problem is now solved
[well, a better solution of course would add the "not-yet"
 functionality..]; 
thank you for the contribution.

Martin



More information about the R-devel mailing list