[datatable-help] Infinite numeric key doesn't collapse

caneff at gmail.com caneff at gmail.com
Wed Feb 12 17:01:56 CET 2014


I have a numeric key in a data.table that sometimes has infinite values. I
discovered today that Inf does not collapse when used in a by.  Is this
expected? It surprised me:

DT <- data.table(x=rep(c(1,Inf), each=10), y=1:20)

DT[, sum(y), by=x] # The x==1 cases collapse, but the Inf cases don't
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/datatable-help/attachments/20140212/e1a56ddc/attachment.html>


More information about the datatable-help mailing list