Data.table: Bit64 nomatch error

Created on 27 Dec 2019  路  2Comments  路  Source: Rdatatable/data.table

Not sure if this should be a data.table issue or a bit64 issue because the error only occurs if the column in question is a bit64 column and nomatch=0...

require(bit64)
a = data.table(id=c(1,2,3), mergeTime=as.integer64(c(10, 20, 30)))
b = data.table(bid=c(5,6,7), mergeTime=as.integer64(c(13, 25, 39)))
a[b, list(
  id,
  bid,
  deltaId = i.bid - x.id,
  deltaTs = i.mergeTime - x.mergeTime #This line in J() causes the error
), on ='mergeTime', roll=1, nomatch=0]
Error in if (n1%%n2) warning("length(e1) not a multiple length(e2)") : 
  argument is not interpretable as logical
> sessionInfo()
R version 3.6.1 (2019-07-05)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Red Hat Enterprise Linux Server 7.5 (Maipo)

Matrix products: default
BLAS:   /usr/lib64/libblas.so.3.4.2
LAPACK: /usr/lib64/liblapack.so.3.4.2

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8    LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] grid      stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] viridis_0.5.1          viridisLite_0.3.0      dino_0.1.0             nanotime_0.2.4         scales_1.1.0          
 [6] sna_2.4                statnet.common_4.3.0   network_1.16.0         ggnet_0.1.0            egg_0.4.5             
[11] subprocess_0.8.3       openssl_1.4.1          stringr_1.4.0          memoise_1.1.0.9000     logger_0.1            
[16] gridExtra_2.3          RColorBrewer_1.1-2     reticulate_1.13.0-9000 ggplot2_3.2.1          data.table_1.12.2     
[21] bit64_0.9-7            bit_1.1-14            

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.2       plyr_1.8.4       pillar_1.4.2     compiler_3.6.1   tools_3.6.1      digest_0.6.22   
 [7] lattice_0.20-38  jsonlite_1.6     lifecycle_0.1.0  tibble_2.1.3     gtable_0.3.0     png_0.1-7       
[13] pkgconfig_2.0.3  rlang_0.4.2      rstudioapi_0.10  RcppCCTZ_0.2.6   xfun_0.11        coda_0.19-3     
[19] knitr_1.26       withr_2.1.2      dplyr_0.8.3      askpass_1.1      tidyselect_0.2.5 glue_1.3.1      
[25] R6_2.4.1         farver_2.0.1     reshape2_1.4.3   purrr_0.3.3      magrittr_1.5     assertthat_0.2.1
[31] colorspace_1.4-1 labeling_0.3     stringi_1.4.3    lazyeval_0.2.2   munsell_0.5.0    crayon_1.3.4    
[37] zoo_1.8-6   

Most helpful comment

This may be a bit64 issue. In your case, there are no matches between a and b, so deltaTs is equivalent to

as.integer64() - as.integer64()

Which gives the same error:

Error in if (n1%%n2) warning("length(e1) not a multiple length(e2)") :
argument is not interpretable as logical

I've e-mailed the maintainer, Jens O.

All 2 comments

This may be a bit64 issue. In your case, there are no matches between a and b, so deltaTs is equivalent to

as.integer64() - as.integer64()

Which gives the same error:

Error in if (n1%%n2) warning("length(e1) not a multiple length(e2)") :
argument is not interpretable as logical

I've e-mailed the maintainer, Jens O.

Respons from Jens:

Hi Michael,
Thanks for reporting.
I will soon release a new bundle of ff/bit/bit64 which supports zero-length ff. In the course of this, > integer64() has already been fixed.
Best
Jens

I'll go ahead and close this now, please keep an eye out for bit64's CRAN release

Was this page helpful?
0 / 5 - 0 ratings