isUndefined {rmzqc} | R Documentation |
Tell if a string is undefined (NA or NULL); If yes, and its required by the mzQC standard, we can raise an error.
Description
You can pass multiple strings, which are all checked. If any of them is undefined, the function returns TRUE
Usage
isUndefined(s, ..., verbose = TRUE)
Arguments
s |
A string to be checked for NA/NULL |
... |
More strings to be checked |
verbose |
If TRUE and 's' is NULL/NA, will print the name of the variable which was passed in |
Examples
isUndefined(NA) ## TRUE
isUndefined(NULL) ## TRUE
isUndefined(NA, NULL) ## TRUE
isUndefined("") ## FALSE
isUndefined("", NA) ## TRUE
isUndefined(NA, "") ## TRUE
isUndefined(1) ## FALSE
myVar = NA
isUndefined(myVar) ## TRUE, with warning "Variable 'myVar' is NA/NULL!"
[Package rmzqc version 0.5.4 Index]