<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix"><br>
Sorry - haven't got to implementing grouping or keys for integer64
yet. All that's been done is integer64 in fread. There's a bug
item on the list.<br>
<br>
Matthew<br>
<br>
On 14/09/13 20:05, Harish wrote:<br>
</div>
<blockquote
cite="mid:1379185529.38620.YahooMailNeo@web120203.mail.ne1.yahoo.com"
type="cite">
<div style="color:#000; background-color:#fff; font-family:times
new roman, new york, times, serif;font-size:12pt">I am trying to
use "by" on integer64 data and data.table seems to think that
there is only one value. This is reproduced with the following:<br>
<br>
library( data.table )<br>
library( bit64 )<br>
<br>
DT <- data.table( a=rep( 1:5, 2), b=15:24 )<br>
DT[ , .N, by=a ]<br>
DT[ , a := as.integer64( a ) ]<br>
DT[ , .N, by=a ]<br>
<br>
The output I get is:<br>
<br>
<div>> DT <- data.table( a=rep( 1:5, 2), b=15:24 )<br>
> DT[ , .N, by=a ]<br>
a N<br>
1: 1 2<br>
2: 2 2<br>
3: 3 2<br>
4: 4 2<br>
5: 5 2<br>
> DT[ , a := as.integer64( a ) ]<br>
> DT[ , .N, by=a ]<br>
a N<br>
1: 1 10</div>
<div><br>
</div>
<div>Notice that the "by" after converting column "a" to
integer64 is different from before. However, the values of
"a" are correct:<br>
</div>
<div>> DT$a<br>
integer64<br>
[1] 1 2 3 4 5 1 2 3 4 5</div>
<div><br>
</div>
<div>I am using the latest version of data.table from r-forge
(1.8.11 Rev 965). I also had the same issue with 1.8.10 from
CRAN.<br>
</div>
<div><br>
</div>
<div>Am I doing something wrong or is this a bug? Thanks for
your help.<br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>Regards,</div>
<div>Harish</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
datatable-help mailing list
<a class="moz-txt-link-abbreviated" href="mailto:datatable-help@lists.r-forge.r-project.org">datatable-help@lists.r-forge.r-project.org</a>
<a class="moz-txt-link-freetext" href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help</a></pre>
</blockquote>
<br>
</body>
</html>