allValid: Check if a vector/list of values given is valid as per the...

Description Usage Arguments Value Examples

View source: R/utils.R

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

1
allValid(testData, testFun, ...)

Arguments

testData

The list/vector of values to validate

testFun

The validation function to test each value of testData against

...

Other parameters to pass on to the testFun

Value

TRUE/FALSE

Examples

1
2
3
4
5
  Rnightlights:::allValid(c("KEZ", "UGA", "RWA", "TZA"), Rnightlights:::validCtryCodes)



  Rnightlights:::allValid(c("2012", "2015"), validNlPeriods, "OLS.Y")

chrisvwn/Rnightlights documentation built on Sept. 7, 2021, 1:44 a.m.