[datatable-help] Stackoverflow thread comparing merge times
Matthew Dowle
mdowle at mdowle.plus.com
Tue Dec 7 20:07:06 CET 2010
Does anyone have time to see if this post uses data.table correctly :
http://stackoverflow.com/questions/4322219/whats-the-fastest-way-to-merge-join-data-frames-in-r
The dt[, colMeans(cbind(x, y)), by="g1,g2"] bit looks wrong to me. Is
that why it takes 131 seconds vs 2.73 for sqldf ? Shouldn't it be
dt[,list(mean(x),mean(y)),by="g1,g2"] ?
And also the y2= bit of dt1[dt2,list(x,y1,y2=dt2$y2)] looks odd.
Matthew
More information about the datatable-help
mailing list