Dear Developers and Contributors
I could not get the arsenal::comparedf() function to tolerate difference between two date-time object, it always show differences exist. However, tol.date.absolute() function works fine.
The package version shown "3.6.4" from 2021-6-4. I wonder if the package considered to be no longer actively maintained?
Thanks All !
`
library(arsenal)
df1 <- data.frame(
tm = as.POSIXct(
c("2024-10-03 17:04:00"
,"2024-08-08 17:27:19"
,"2024-07-10 17:42:51"
, NA_character_)
)
)
df2 <- data.frame(
tm = as.POSIXct(
c("2024-10-03 17:03:59"
,"2024-08-08 17:27:18"
,"2024-07-10 17:42:55"
,"2024-09-01 14:37:11")
)
)
`
tol.date.absolute() returns TRUE: differs by more than 1 secs; FALSE: differs less & equal than 1 sec
[1] FALSE FALSE TRUE TRUE
tol.date.absolute(df1$tm, df2$tm, 1)
However, comparedf() always show four differences: all four elements differs.
summary( comparedf( df1 ,df2 ,control = list( tol.date = function(x,y, tol) tol.date.absolute(x, y, tol) ,tol.date.val = 1 ) ) )
Dear Developers and Contributors
I could not get the arsenal::comparedf() function to tolerate difference between two date-time object, it always show differences exist. However, tol.date.absolute() function works fine.
The package version shown "3.6.4" from 2021-6-4. I wonder if the package considered to be no longer actively maintained?
Thanks All !
`
library(arsenal)
df1 <- data.frame(
tm = as.POSIXct(
c("2024-10-03 17:04:00"
,"2024-08-08 17:27:19"
,"2024-07-10 17:42:51"
, NA_character_)
)
)
df2 <- data.frame(
tm = as.POSIXct(
c("2024-10-03 17:03:59"
,"2024-08-08 17:27:18"
,"2024-07-10 17:42:55"
,"2024-09-01 14:37:11")
)
)
`
tol.date.absolute() returns TRUE: differs by more than 1 secs; FALSE: differs less & equal than 1 sec
[1] FALSE FALSE TRUE TRUE
tol.date.absolute(df1$tm, df2$tm, 1)However, comparedf() always show four differences: all four elements differs.
summary( comparedf( df1 ,df2 ,control = list( tol.date = function(x,y, tol) tol.date.absolute(x, y, tol) ,tol.date.val = 1 ) ) )