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

Negated inequality does not take rounding into account #145

Open
edwindj opened this issue Jun 29, 2021 · 1 comment
Open

Negated inequality does not take rounding into account #145

edwindj opened this issue Jun 29, 2021 · 1 comment
Labels

Comments

@edwindj
Copy link
Member

edwindj commented Jun 29, 2021

library(validate)
rules <- validator(!(x > 0))
rules2 <- validator(x <= 0)

dat <- data.frame(x = 1.001)
summary(confront(dat, rules, lin.ineq.eps=0.01))
##   name items passes fails nNA error warning expression
## 1   V1     1      0     1   0 FALSE   FALSE   !(x > 0)
summary(confront(dat, rules2, lin.ineq.eps=0.01))
##   name items passes fails nNA error warning      expression
## 1   V1     1      0     1   0 FALSE   FALSE (x - 0) <= 0.01

See also #136 : would be fixed when sub expressions are taken into account

@edwindj edwindj added the bug label Jun 29, 2021
@edwindj
Copy link
Member Author

edwindj commented Jun 29, 2021

Thanks to Sigrid van Hoek for noticing!

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

No branches or pull requests

1 participant