[datatable-help] duplicated, with a key

Joseph Voelkel jgvcqa at rit.edu
Sun Mar 4 05:15:30 CET 2012


Thanks. That makes sense. And apologies for not just checking duplicated.data.table.

-----Original Message-----
From: Matthew Dowle [mailto:mdowlenoreply at virginmedia.com] On Behalf Of Matthew Dowle
Sent: Saturday, March 03, 2012 8:04 PM
To: Joseph Voelkel
Cc: datatable-help at lists.r-forge.r-project.org
Subject: Re: [datatable-help] duplicated, with a key

Yes, that's documented in ?duplicated.data.table.

Matthew

On Sat, 2012-03-03 at 17:53 -0500, Joseph Voelkel wrote:
> Is the second result by design? I found it confusing:
> 
> x<-data.table(a=c(1:5,1:5),b=1:10)
> sum(duplicated(x)) # 0, as expected
> setkey(x,a)
> sum(duplicated(x)) # 5

> Thanks,

> Joe
> 
> Joseph G. Voelkel, Ph.D.
> 
> Graduate Program Chair, Center for Quality and Applied Statistics
> 
> Kate Gleason College of Engineering
> 
> Rochester Institute of Technology
> 
> V 585-475-2231
> 
> F 585-475-5959
> 
> joseph.voelkel at rit.edu
> 
>  
> 
> CONFIDENTIALITY NOTE: The information transmitted, including 
> attachments, is intended only for the person(s) or entity to which it 
> is addressed and may contain confidential and/or privileged material.
> Any review, retransmission, dissemination or other use of, or taking 
> of any action in reliance upon this information by persons or entities 
> other than the intended recipient is prohibited. If you received this 
> in error, please contact the sender and destroy any copies of this 
> information.
> 
>  
> 
> 
> _______________________________________________
> datatable-help mailing list
> datatable-help at lists.r-forge.r-project.org
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable
> -help




More information about the datatable-help mailing list