From Waclaw.Marcin.Kusnierczyk at idi.ntnu.no  Tue Mar 31 16:03:12 2009
From: Waclaw.Marcin.Kusnierczyk at idi.ntnu.no (Wacek Kusnierczyk)
Date: Tue, 31 Mar 2009 16:03:12 +0200
Subject: [Rd] duplicated.data.frame {was "[R] which rows are
	duplicates?"}
In-Reply-To: <18898.6300.26434.413865@lynne.math.ethz.ch>
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>
Message-ID: <49D222A0.7020601@idi.ntnu.no>

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



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