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