-
Notifications
You must be signed in to change notification settings - Fork 42
Open
Description
Hi, thanks for the great package! It really helps a lot.
I’ve encountered unexpected behavior when using checking for a functional dependency.
My expectation is that this rule should fail for every row with a value of a that has not a unique corresponding value in b. However, in practice, the rule only fails for all but the first offending row — it appears that only the first violation is ignored or not counted.
d <- data.frame(a = c(1, 1), b = c(1, 2))
val <- validator(a ~ b)
out <- confront(d, val)
nrow(violating(d, out))
# 1
I would expect it to mark both rows as violating similar to is_unique:
d <- data.frame(a = c(1, 1), b = c(1, 2))
val <- validator(is_unique(a))
out <- confront(d, val)
nrow(violating(d, out))
# 2
Is this a bug or the intended behaviour?
IamMickey
Metadata
Metadata
Assignees
Labels
No labels