isValidMzQC {rmzqc} | R Documentation |
Checks validity (= completeness) of mzQC objects - or lists (JSON arrays) thereof
Description
Note: Returns TRUE for empty lists!
Usage
isValidMzQC(x, parent_context = NULL)
Arguments
x |
An mzQC R6 class (or list of them), which will be subjected to validation |
parent_context |
Internal parameter used to track the path in nested validations |
Details
This function checks if an mzQC object or a list of mzQC objects is valid. For lists, all elements need to be valid for the function to return TRUE. The function provides detailed error messages that include the path to the invalid field, making it easier to identify validation issues in complex nested structures.
Examples
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
[Package rmzqc version 0.7.0 Index]