All,
I have a simple question regarding the behavior of unique with more than 1 key.
Consider the example:
> dt <- data.table(X=c(NA,1,2,3), Y=c(NA,2,1,3))
> dt
X Y
[1,] NA NA
[2,] 1 2
[3,] 2 1
[4,] 3 3
> key(dt) <- c("X", "Y")
> unique(dt)
X Y
[1,] NA NA
[2,] 2 1
[3,] 3 3
If I understand this correctly, unique see rows 2 and 3 of dt as the same.
Is this the behavior one wants?
Thanks for any clarification.
Damian
_______________________________________________
datatable-help mailing list
[email protected]
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help