isUndefined: Tell if a string is undefined (NA or NULL); If yes, and its...

View source: R/MzQC_classes.R

isUndefinedR 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(1)        ## FALSE
myVar = NA
isUndefined(myVar)    ## TRUE, with warning "variable 'myVar' is NA/NULL!"


PTXQC documentation built on March 22, 2022, 5:08 p.m.