Thanks, that did it. I only had version 1.5.3 from CRAN.
Andreas
I believe this was a bug that was fixed since the last release of data.table.
Assuming you are using data.table 1.5.3 (you didn't provide
sessionInfo :-), explicitly naming hte key columns will work, eg:
R> p[, length(fname_c2), by=list(fname_c1, lname_c2)]
fname_c1 lname_c2 V1
[1,] 0 0 15454
[2,] 1 0 173
If you install data.table from R-forge, your current incantation will
work as well, eg:
R> install.packages('data.table', repos='http://r-forge.r-project.org')
R> # ... reload all your data and what not
R> p[, length(fname_c2), by=keyCol]
fname_c1 lname_c2 V1
[1,] 0 0 15454
[2,] 1 0 173
R> sessionInfo()
R version 2.12.1 (2010-12-16)
Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)
...
other attached packages:
[1] data.table_1.5.4 RecordLinkage_0.3-1 RSQLite_0.9-4
...
Hope that helps,
-steve
--
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: [email protected]
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.
_______________________________________________
datatable-help mailing list
[email protected]
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help