8000 Issue with int64 columns tolerance is not taken into account · Issue #81 · gowerc/diffdf · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Issue with int64 columns tolerance is not taken into account #81
Closed
@hannes101

Description

@hannes101

Dear all,

first of all thanks a lot for this package, it really makes it easy to detect differences in data.frames.
I would like to report an issue with int64 columns, which are part of the bit64 package.

library(bit64)
library(data.table)
df1.int64 <- structure(list(date = 20220908, val = structure(2.76818691336063e-313, class = "integer64")), row.names = c(NA, 
-1L), class = c("data.table", "data.frame"))
df2.int64 <- structure(list(date = 20220908, val = structure(2.76818691341003e-313, class = "integer64")), row.names = c(NA, 
-1L), class = c("data.table", "data.frame"))

df1.num <- structure(list(date = 20220908, val = 56028726884), row.names = c(NA, 
-1L), class = c("data.table", "data.frame"))
df2.num <- structure(list(date = 20220908, val = 56028726885), row.names = c(NA, 
-1L), class = c("data.table", "data.frame"))

diffdf(df1.num, df2.num, tolerance = 1, scale = 1)
No issues were found!
diffdf(df1.int64, df2.int64, tolerance = 1, scale = 1)
Differences found between the objects!

A summary is given below.

Not all Values Compared Equal
All rows are shown in table below

  =============================
   Variable  No of Differences 
  -----------------------------
     val             1         
  -----------------------------


All rows are shown in table below

  ===================================================
   VARIABLE  ..ROWNUMBER..     BASE        COMPARE   
  ---------------------------------------------------
     val           1        56028726884  56028726885 
  ---------------------------------------------------

Warning message:
In diffdf(df1.int64, df2.int64, tolerance = 1, scale = 1) : 
Not all Values Compared Equal

It was not really obvious to me, that it doesn't work at the beginning.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0