[datatable-help] Bug filled [#4878]

Matthew Dowle mdowle at mdowle.plus.com
Tue Sep 3 20:18:53 CEST 2013


Just to clear up this thread, it's plonking.  Search for "plonk" in 
?":=".  I've closed the bug report.

Matthew

On 03/09/13 16:10, statquant3 wrote:
> 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
> datatable-help at lists.r-forge.r-project.org
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help
>



More information about the datatable-help mailing list