[datatable-help] Select only group columns (by supplied but not j)

Andreas Borg andreas.borg at unimedizin-mainz.de
Thu May 12 09:44:21 CEST 2011


Matthew Dowle schrieb:
> Hi,
>
> What's the difference to just calling unique?
>
>   
Hi Matthew,

I have to admit that my usage of data.table might go to the limits of 
what it is intended for. But I have reasons for not using unique in this 
case. I do another grouping operation on the same data (that one is 
reflected in my other post "Incrementing numbers...")  and I need the 
same order of groups in both cases. So it would need some construct like 
dt[order(unique(dt),]. Using the data table saves a second sort 
operation and the overhead of unique.

Andreas

-- 
Andreas Borg
Medizinische Informatik

UNIVERSITÄTSMEDIZIN
der Johannes Gutenberg-Universität
Institut für Medizinische Biometrie, Epidemiologie und Informatik
Obere Zahlbacher Straße 69, 55131 Mainz
www.imbei.uni-mainz.de

Telefon +49 (0) 6131 175062
E-Mail: borg at imbei.uni-mainz.de

Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der
richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den
Absender und löschen Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe
dieser Mail und der darin enthaltenen Informationen ist nicht gestattet.



More information about the datatable-help mailing list