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

Bug in locate_errors #31

Closed
markvanderloo opened this issue Jan 29, 2021 · 1 comment
Closed

Bug in locate_errors #31

markvanderloo opened this issue Jan 29, 2021 · 1 comment
Labels

Comments

@markvanderloo
Copy link
Member

The following gives an invalid solution (version 0.5.1)

library(errorlocate)
d <- data.frame(
  x = 10, y = NA, z=5
)
v <- validator(x + y == z, x>=0, y>=0)

out <- locate_errors(d,v)
out$errors

replace_errors(d,v)
edwindj added a commit that referenced this issue Jan 29, 2021
@edwindj
Copy link
Member

edwindj commented Jan 29, 2021

Bug is fixed, actually were multiple bugs rolled into one master bug:

  • when a variable had a missing value the mip problem was not well formulated (most of the times it worked in some cases it didn't). Should be fixed now

  • as an optimization records without fails (as in validate::confront and aggregate(cf, by="record")) were skipped in errorlocate. This resulted in skipping the record above in the example: because y == NA validate::confront returns NA and not fail.

  • This has been changed into that errorlocate now only skips records when there are no nNA or fails on a record.

@edwindj edwindj closed this as completed Jan 29, 2021
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

2 participants