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 > [email protected] > (mailto:[email protected]) > https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help > >
_______________________________________________ datatable-help mailing list [email protected] https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help
