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

comparedf() doesn't work on datatime POSIXct object #372

Open
quanzou opened this issue Oct 21, 2024 · 0 comments
Open

comparedf() doesn't work on datatime POSIXct object #372

quanzou opened this issue Oct 21, 2024 · 0 comments

Comments

@quanzou
Copy link

quanzou commented Oct 21, 2024

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 ) ) )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant