# NOT RUN {
# for each element i the sequence (a,b,c,a,c,a)
# compute how often it occurrs in the sequence.
occurs(c("a","b","c","a","c","a"))
# for each record in 'iris' how often do the same
# (Sepal.Length, Species) combinations occur?
with(iris, occurs(Sepal.Length, Species))
# in the context of a validation. Check whether
# each individual Species occurs at least 10 times.
rules <- validator(occurs(Species) > 10)
cf <- confront(iris, rules)
summary(cf)
# }
Run the code above in your browser using DataLab