data-cleaning / errorlocate

Find and replace erroneous fields in data using validation rules
http://data-cleaning.github.io/errorlocate/
21 stars 3 forks source link

equality in `if` clause currently failing ("Error in invert_(e) : == not supported") #17

Closed edwindj closed 5 years ago

edwindj commented 5 years ago

Currently the following is failing

library(errorlocate)
rules <- validator(if (a == 0) b == 0)
locate_errors(data.frame(a=0, b=1), rules)

and results in

Error in invert_(e) : == not supported
edwindj commented 5 years ago

This issues was solved in validatetools, but has to be integrated into errorlocate. For the time being this can be circumvented by formulating the rules as

rules <- validator(if (a >= 0 && a <=0) b == 0)
locate_errors(data.frame(a=0, b=1), rules)

which works as promised

edwindj commented 5 years ago

The issue is solved in branch validatetools which will merged with master branch asap

edwindj commented 5 years ago

Merged into the latest development version