isNaVector(NA)
# returns TRUE (argument is valid)
isNaVector("X")
# returns FALSE (argument is invalid)
#isNaVector("X", stopIfNot = TRUE)
# throws exception with message defined by message and argumentName parameters
Run the code above in your browser using DataLab