From maechler at stat.math.ethz.ch  Tue Mar 31 17:55:38 2009
From: maechler at stat.math.ethz.ch (Martin Maechler)
Date: Tue, 31 Mar 2009 17:55:38 +0200
Subject: [Rd] duplicated.data.frame {was "[R] which rows are
	duplicates?"}
In-Reply-To: <49D222A0.7020601@idi.ntnu.no>
References: <0F1D79E9-7146-48FB-95E9-3CD95DBD18E8@gmail.com>
	<Zen-1LoF5b-0003BD-Rf@smarthost01.mail.zen.net.uk>
	<49D0BA70.3090005@idi.ntnu.no>
	<18898.6300.26434.413865@lynne.math.ethz.ch>
	<49D222A0.7020601@idi.ntnu.no>
Message-ID: <18898.15610.610205.300523@lynne.math.ethz.ch>

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



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