Coerced 'double' RHS to 'integer' to match the column's type; may have truncated precision

Create issue
Issue #9 resolved
George W. created an issue

SPX1715I1000 <- get_iqfeed_data('SPX1715I1000', '2017-01-01', '2017-08-25', 'tick')

The above produced the following warning, not sure what is causing it. Warning message: In [.data.table(periods, -1, :=(from, from + 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 4 (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.

Comments (4)

  1. George W. reporter

    Sorry, maybe my version is slightly outdated. I will update to latest and try again. Thanks for looking into this!

  2. George W. reporter

    Do you mind update the latest dev version to 0.5.6? I couldn't tell the difference by looking at version number, but I updated to latest anyway and the warning went away. Thanks!

  3. Log in to comment