It’s really simple. Lets say we have two groups of data elements for a given period,orgunit and attribute option.
foo<-c(1,2,3)
bar<-c()
baz<-c(4,5,6)
foo
indicates that data has been entered, while for the collection of bar
data elements, no data has been entered. When testing for “Exclusive pairs”, we wish to determine if data has been entered for the “left side”, then not data should exist on the right side. It’s simple, we just test if the length of the array of values is greater than zero and OR both sides
This would be a pass.
length(foo)==0 | length(bar)==0
## [1] TRUE
This would be a failure.
length(foo)==0 | length(baz)==0
## [1] FALSE
For “Compulsory pairs”, we would be looking for if data has been entered on the “left side” then it is compulsory on the “right side”.
This would be a pass.
length(foo)>0 & length(baz)>0
## [1] TRUE
This would be a failure.
length(foo)>0 & length(bar)>0
## [1] FALSE