Here is a simple example of a simple question:

dt<-data.table(a=rep(1:5,1:5),b=1,c=rep(1:3,5))
dt
dt[,seq_along(b),by=a] # expected behavior (note: dt is already in order of a)
setkey(dt,c) # to sort by c
dt
dt[,seq_along(b),by=a] # expected behavior? Appears to be in order of 
unique(dt$a)

Thanks,

Joe Voelkel
_______________________________________________
datatable-help mailing list
[email protected]
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help

Reply via email to