[datatable-help] duplicated, with a key

Matthew Dowle mdowle at mdowle.plus.com
Sun Mar 4 02:04:11 CET 2012


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