Filed bug 1631.<br><br><div class="gmail_quote">On Fri, Oct 21, 2011 at 3:31 PM, Matthew Dowle <span dir="ltr"><<a href="mailto:mdowle@mdowle.plus.com">mdowle@mdowle.plus.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Thanks I see that too. So that's how the invalid keys can arise! Bit<br>
trickier this one, please could you raise a<br>
bug.report(package="data.table")<br>
so it doesn't get forgotten.<br>
<div><div class="h5"><br>
On Fri, 2011-10-21 at 12:49 -0700, Muhammad Waliji wrote:<br>
> The following warning occurs in both versions 1.6.6 and 1.7.1. I<br>
> haven't tried other versions.<br>
><br>
><br>
> > DT <- data.table(var1=rep(c(1, 2), each=5),<br>
> + var2=seq(0, 1, length.out=10),<br>
> + key="var1")<br>
> > DT.2 <- DT[, list(sum(var2)), list(ifelse(var1 == 1, 1, NA))]<br>
> > setkey(DT.2, var1)<br>
> Warning message:<br>
> In setkey(DT.2, var1) :<br>
> Already keyed by this key but had invalid row order, key rebuilt. If<br>
> you didn't go under the hood please let maintainer('data.table') know<br>
> so the root cause can be fixed.<br>
><br>
><br>
</div></div>> _______________________________________________<br>
> datatable-help mailing list<br>
> <a href="mailto:datatable-help@lists.r-forge.r-project.org">datatable-help@lists.r-forge.r-project.org</a><br>
> <a href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help" target="_blank">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help</a><br>
<br>
<br>
</blockquote></div><br>