<div dir="ltr"><span style="font-family:arial,sans-serif;font-size:13px">I'm seeing the same thing as Arun: </span><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div class="gmail_extra" style="font-family:arial,sans-serif;font-size:13px">
<div><br></div><div><div>> dt[, diffs := round(c(NA, diff(y) * 1e8), 3)]</div><div>> dt</div><div> x y diffs</div><div> 1: 19 4.594595e-08 NA</div><div> 2: 17 7.007007e-08 2.412</div>
<div> 3: 45 3.543544e-08 -3.463</div><div> 4: 38 6.326326e-08 2.783</div><div> 5: 23 7.847848e-08 1.522</div><div> 6: 46 5.975976e-08 -1.872</div><div> 7: 3 3.073073e-08 -2.903</div><div>
8: 4 9.909910e-08 6.837</div><div> 9: 16 5.535536e-08 -4.374</div><div>10: 25 9.609610e-08 4.074</div><div>11: 24 9.309309e-08 -0.300</div><div>12: 12 7.000022e-01 70000210.691</div><div>13: 31 3.453453e-08 -70000216.547</div>
<div>14: 34 5.565566e-08 2.112</div><div>15: 14 1.241241e-08 -4.324</div></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Apr 30, 2013 at 9:52 AM, Arunkumar Srinivasan <span dir="ltr"><<a href="mailto:aragorn168b@gmail.com" target="_blank">aragorn168b@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div>
Hi there,
</div><div><br></div><div>I just saw something strange when I was sorting a column of p-values. I checked the data.table bug tracker for words "sort" and "floating point" and there were no hits for this case. There's a bug for "integer 64" sort on a column though.</div>
<div><br></div><div>So, here's a reproducible example. I'd be glad to file a bug, if it is and be corrected if it's something I am doing wrong.</div><div><br></div><div><div>set.seed(45)</div><div>dt <- data.table(x=sample(50), y= sample(c(seq(0, 1, length.out=1000), 7000000:7000100), 50)/1e7)</div>
<div>head(dt)</div><div> x y</div><div>1: 32 5.395395e-08</div><div>2: 16 6.956957e-08</div><div>3: 12 2.142142e-08</div><div>4: 18 5.855856e-08</div><div>5: 17 6.216216e-08</div><div>6: 14 5.025025e-08</div>
<div>setkey(dt, "y") # sort by column y</div><div>head(dt, 10)</div><div> x y</div><div> 1: 47 1.401401e-09</div><div> 2: 12 2.142142e-08</div><div> 3: 24 1.391391e-08</div><div> 4: 43 9.809810e-09 <~~~ obviously false</div>
<div> 5: 1 2.932933e-08</div><div> 6: 48 2.562563e-08</div><div> 7: 49 1.891892e-08</div><div> 8: 40 2.182182e-08</div><div> 9: 9 7.307307e-09 <~~~ obviously false</div><div>10: 45 2.482482e-08</div></div><div><br></div>
<div><div>Best,</div><div>Arun</div><div><br></div></div>
<br>_______________________________________________<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></blockquote></div><br></div></div>