[datatable-help] Bug filled [#4878]

Arunkumar Srinivasan aragorn168b at gmail.com
Tue Sep 3 17:05:02 CEST 2013


Seems you're right. I missed that warning message... 

Arun


On Tuesday, September 3, 2013 at 4:59 PM, statquant3 wrote:

> Yes x = NA makes x logical but data.table is supposed to keep the type of the
> LHS when you do an update That's why you get the usual 
> Message d'avis :
> In `[.data.table`(DT, , `:=`(a, 1.1)) :
> Coerced 'double' RHS to 'integer' to match the column's type; may have
> truncated precision. Either change the target column to 'double' first (by
> creating a new 'double' vector length 3 (nrows of entire table) and assign
> that; i.e. 'replace' column), or coerce RHS to 'integer' (e.g. 1L,
> NA_[real|integer]_, as.*, etc) to make your intent clear and for speed. Or,
> set the column type correctly up front when you create the table and stick
> to it, please.
> 
> So I think it should still be the case even for 1 row data.table
> 
> 
> 
> --
> View this message in context: http://r.789695.n4.nabble.com/Bug-filled-4878-tp4675263p4675268.html
> Sent from the datatable-help mailing list archive at Nabble.com (http://Nabble.com).
> _______________________________________________
> datatable-help mailing list
> datatable-help at lists.r-forge.r-project.org (mailto:datatable-help at lists.r-forge.r-project.org)
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help
> 
> 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/datatable-help/attachments/20130903/86754878/attachment.html>


More information about the datatable-help mailing list