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