<div>
Seems you're right. I missed that warning message...
</div>
<div><div><br></div><div>Arun</div><div><br></div></div>
<p style="color: #A0A0A8;">On Tuesday, September 3, 2013 at 4:59 PM, statquant3 wrote:</p>
<blockquote type="cite" style="border-left-style:solid;border-width:1px;margin-left:0px;padding-left:10px;">
<span><div><div><div>Yes x = NA makes x logical but data.table is supposed to keep the type of the</div><div>LHS when you do an update That's why you get the usual </div><div>Message d'avis :</div><div>In `[.data.table`(DT, , `:=`(a, 1.1)) :</div><div> Coerced 'double' RHS to 'integer' to match the column's type; may have</div><div>truncated precision. Either change the target column to 'double' first (by</div><div>creating a new 'double' vector length 3 (nrows of entire table) and assign</div><div>that; i.e. 'replace' column), or coerce RHS to 'integer' (e.g. 1L,</div><div>NA_[real|integer]_, as.*, etc) to make your intent clear and for speed. Or,</div><div>set the column type correctly up front when you create the table and stick</div><div>to it, please.</div><div><br></div><div>So I think it should still be the case even for 1 row data.table</div><div><br></div><div><br></div><div><br></div><div>--</div><div>View this message in context: <a href="http://r.789695.n4.nabble.com/Bug-filled-4878-tp4675263p4675268.html">http://r.789695.n4.nabble.com/Bug-filled-4878-tp4675263p4675268.html</a></div><div>Sent from the datatable-help mailing list archive at <a href="http://Nabble.com">Nabble.com</a>.</div><div>_______________________________________________</div><div>datatable-help mailing list</div><div><a href="mailto:datatable-help@lists.r-forge.r-project.org">datatable-help@lists.r-forge.r-project.org</a></div><div><a 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></div></div></div></span>
</blockquote>
<div>
<br>
</div>