Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Partially create an integer64 column results in garbage values #3723

Closed
shrektan opened this issue Jul 23, 2019 · 0 comments · Fixed by #3724
Closed

Partially create an integer64 column results in garbage values #3723

shrektan opened this issue Jul 23, 2019 · 0 comments · Fixed by #3724
Milestone

Comments

@shrektan
Copy link
Member

library(data.table)
dt <- data.table(
  x = c(1L, 2L)
)
dt[x == 1L, y:=bit64::as.integer64(5)][]
#>    x                   y
#> 1: 1                   5
#> 2: 2 9218868437227407266
str(dt)
#> Classes 'data.table' and 'data.frame':   2 obs. of  2 variables:
#>  $ x: int  1 2
#>  $ y:integer64 5 9218868437227407266 
#>  - attr(*, ".internal.selfref")=<externalptr> 
#>  - attr(*, "index")= atomic  
#>   ..- attr(*, "__x")= int

Created on 2019-07-23 by the reprex package (v0.2.1)

Session info
devtools::session_info()
#> - Session info ----------------------------------------------------------
#>  setting  value                                              
#>  version  R version 3.4.4 (2018-03-15)                       
#>  os       Windows 7 x64 SP 1                                 
#>  system   x86_64, mingw32                                    
#>  ui       RTerm                                              
#>  language (EN)                                               
#>  collate  Chinese (Simplified)_People's Republic of China.936
#>  ctype    Chinese (Simplified)_People's Republic of China.936
#>  tz       Asia/Taipei                                        
#>  date     2019-07-23                                         
#> 
#> - Packages --------------------------------------------------------------
#>  package     * version    date       lib source        
#>  assertthat    0.2.1      2019-03-21 [1] CRAN (R 3.4.4)
#>  backports     1.1.3      2018-12-14 [1] CRAN (R 3.4.4)
#>  bit           1.1-14     2018-05-29 [1] CRAN (R 3.4.4)
#>  bit64         0.9-7      2017-05-08 [1] CRAN (R 3.4.0)
#>  callr         3.2.0      2019-03-15 [1] CRAN (R 3.4.4)
#>  cli           1.1.0      2019-03-19 [1] CRAN (R 3.4.4)
#>  crayon        1.3.4      2017-09-16 [1] CRAN (R 3.4.4)
#>  data.table  * 1.12.3     2019-07-08 [1] local         
#>  desc          1.2.0      2018-05-01 [1] CRAN (R 3.4.4)
#>  devtools      2.0.1      2018-10-26 [1] CRAN (R 3.4.4)
#>  digest        0.6.18     2018-10-10 [1] CRAN (R 3.4.4)
#>  evaluate      0.13       2019-02-12 [1] CRAN (R 3.4.4)
#>  fs            1.2.7      2019-03-19 [1] CRAN (R 3.4.4)
#>  glue          1.3.1      2019-03-12 [1] CRAN (R 3.4.4)
#>  highr         0.8        2019-03-20 [1] CRAN (R 3.4.4)
#>  htmltools     0.3.6.9000 2018-05-07 [1] local         
#>  knitr         1.22       2019-03-08 [1] CRAN (R 3.4.4)
#>  magrittr      1.5        2014-11-22 [1] CRAN (R 3.4.4)
#>  memoise       1.1.0      2017-04-21 [1] CRAN (R 3.4.4)
#>  pkgbuild      1.0.3      2019-03-20 [1] CRAN (R 3.4.4)
#>  pkgload       1.0.2      2018-10-29 [1] CRAN (R 3.4.4)
#>  prettyunits   1.0.2      2015-07-13 [1] CRAN (R 3.4.1)
#>  processx      3.3.0      2019-03-10 [1] CRAN (R 3.4.4)
#>  ps            1.3.0      2018-12-21 [1] CRAN (R 3.4.4)
#>  R6            2.4.0      2019-02-14 [1] CRAN (R 3.4.4)
#>  Rcpp          1.0.1      2019-03-17 [1] CRAN (R 3.4.4)
#>  remotes       2.0.2      2018-10-30 [1] CRAN (R 3.4.4)
#>  rlang         0.3.3      2019-03-29 [1] CRAN (R 3.4.4)
#>  rmarkdown     1.12       2019-03-14 [1] CRAN (R 3.4.4)
#>  rprojroot     1.3-2      2018-01-03 [1] CRAN (R 3.4.3)
#>  sessioninfo   1.1.1      2018-11-05 [1] CRAN (R 3.4.4)
#>  stringi       1.4.3      2019-03-12 [1] CRAN (R 3.4.4)
#>  stringr       1.4.0      2019-02-10 [1] CRAN (R 3.4.4)
#>  testthat      2.1.1.9000 2019-06-22 [1] local         
#>  usethis       1.4.0      2018-08-14 [1] CRAN (R 3.4.4)
#>  withr         2.1.2      2018-03-15 [1] CRAN (R 3.4.4)
#>  xfun          0.6        2019-04-02 [1] CRAN (R 3.4.4)
#>  yaml          2.2.0      2018-07-25 [1] CRAN (R 3.4.4)
#> 
#> [1] D:/app/R_lib/3.1
#> [2] D:/app/R/library
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants