The following warning occurs in both versions 1.6.6 and 1.7.1.  I haven't
tried other versions.

> DT <- data.table(var1=rep(c(1, 2), each=5),
+                  var2=seq(0, 1, length.out=10),
+                  key="var1")
> DT.2 <- DT[, list(sum(var2)), list(ifelse(var1 == 1, 1, NA))]
> setkey(DT.2, var1)
Warning message:
In setkey(DT.2, var1) :
  Already keyed by this key but had invalid row order, key rebuilt. If you
didn't go under the hood please let maintainer('data.table') know so the
root cause can be fixed.
_______________________________________________
datatable-help mailing list
[email protected]
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help

Reply via email to