isValidMzQC | R Documentation |
Note: Returns TRUE for empty lists!
isValidMzQC(x, ...)
x |
An mzQC refclass (or list of them), each will be subjected to |
... |
Ellipsis, for recursive argument splitting |
You can pass multiple arguments, which are all checked individually. All of them need to be valid, for TRUE to be returned. The reason for combining both list support for arguments and ellipsis (...) into this function is that JSON arrays are represented as lists and you can simply pass them as a single argument (without the need for do.call()) and get the indices of invalid objects (if any). The ellipsis is useful to avoid clutter, i.e. if (!isValidMzQC(a) || !isValidMzQC(b)) doStuff() is harder to read than if (!isValidMzQC(a,b)) doStuff()
isValidMzQC(MzQCcvParameter$new("MS:4000059")) # FALSE
isValidMzQC(MzQCcvParameter$new("MS:4000059", "Number of MS1 spectra")) # TRUE
isValidMzQC(list(MzQCcvParameter$new("MS:4000059"))) # FALSE
isValidMzQC(list(MzQCcvParameter$new("MS:4000059", "Number of MS1 spectra"))) # TRUE
isValidMzQC(list(MzQCcvParameter$new("MS:4000059", "Number of MS1 spectra")),
MzQCcvParameter$new()) # FALSE
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.