Skip to contents

These functions are used to validate input arguments. In general they are just wrapper around their corresponding is* function with an error message.

Usage

validPeaksMatrix(x)

Arguments

x

object to test.

Value

logical(1), TRUE if validation are successful otherwise an error is thrown.

Details

validPeaksMatrix: see isPeaksMatrix.

See also

Other helper functions for developers: between(), isPeaksMatrix(), rbindFill(), vapply1c(), which.first()

Author

Sebastian Gibb

Examples

try(validPeaksMatrix(1:2))
#> Error in validPeaksMatrix(1:2) : 
#>   'x' has to be a 'numeric' matrix with two columns named 'mz' and 'intensity'. The 'mz' column has to be sorted increasingly.
validPeaksMatrix(cbind(mz = 1:2, intensity = 1:2))
#> [1] TRUE