Submitted here: https://r-forge.r-project.org/tracker/index.php?func=detail&aid=1495&group_id=240&atid=975
On 5 August 2011 03:59, Matthew Dowle <[email protected]> wrote: > Agreed, well spotted. Please enter a : > bug.report(package="data.table"). > Matthew > > "Chris Neff" <[email protected]> wrote in message > news:CAAuY0RVQ5aUJP53HG54P7xtzxbStpjgv0CqdVyT=pwe_plz...@mail.gmail.com... >> Quick example: >> >>> DT <- data.table(x=1:10,y=1:10) >> >>> key(DT) <- "x" >> >>> names(DT) <- c("a", "b", "c") >> >>> key(DT) >> [1] "x" >> >> >> This doesn't seem to be right. An error happens if I do some things: >> >>> x[J(5)] >> Error in `[.data.table`(x, J(5)) : >> sorted columns of x don't exist in the colnames. data.table is not a >> valid data.table >> >> But other things work fine still: >> >>> x[a == 5, ] >> [1,] 5 6 6 >> >> >> When names get changed, the key names should be updated to reflect that, >> no? >> >> -Chris > > > > _______________________________________________ > datatable-help mailing list > [email protected] > https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help > _______________________________________________ datatable-help mailing list [email protected] https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help
