You can get the warning doing this (for example) R) DT = data.table(a=rep(1L,3)) R) DT a 1: 1 2: 1 3: 1 R) DT[,a:=1.1] 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.
-- View this message in context: http://r.789695.n4.nabble.com/Bug-filled-4878-tp4675263p4675271.html Sent from the datatable-help mailing list archive at Nabble.com. _______________________________________________ datatable-help mailing list [email protected] https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help
