allValid: Check if a vector/list of values given is valid as per the given validation function
Description
Check if a vector/list of values given is valid as per the given
validation function. The function will also print a warning
showing the values that are invalid. One can stop the warning
being printed by wrapping the function in the
suppressWarnings function.
Usage
allValid(testData, testFun, ...)
Arguments
testData
The list/vector of values to validate
testFun
The validation function to test each value of testData against
# NOT RUN {# }# NOT RUN {allValid(c("KE", "UGA", "RWA", "TZ"), validCtryCode)
# }# NOT RUN {# }# NOT RUN {allValid(c("2012", "2015"), validNlPeriod, "OLS")
# }# NOT RUN {# }