Hi Daniel, On Fri, Nov 22, 2013 at 6:15 AM, daniel.krizian <[email protected]> wrote: > Hello, I have: > > DT <- data.table(a=1:10, b=1:10,c=1:10, key=c("a","b")) > key(DT) # [1] "a" "b" > key(DT[,list(a,b)]) # NULL > > Note that DT loses its key when I select a subset of columns like above. > > Is this a (known) bug/ expected result?
The key is retained for me when I run your code: R> key(DT[,list(a,b)]) [1] "a" "b" What version of data.table are you using? -steve -- Steve Lianoglou Computational Biologist Genentech _______________________________________________ datatable-help mailing list [email protected] https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help
