is_valid: Check validity of context and inputs/outputs

Description Usage Arguments Value Examples

Description

Compares the input and output items to the expected values for a context and returns TRUE if the inputs/puts are valid for the provided context or an error if not. This method is used internally and not for intended for general use.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
is_valid(context, input_item, input_value, output_item)

## S4 method for signature 'mw_context,character,character,character'
is_valid(context, input_item, input_value, output_item)

## S4 method for signature 'mw_moverz_context,character,character,missing'
is_valid(context, input_item, input_value)

## S4 method for signature 'mw_exactmass_context,character,character,missing'
is_valid(context, input_item, input_value)

Arguments

context

An mw_context object.

input_item

An mw_input_item object, or the name of one.

input_value

The value for the input item (character).

output_item

An mw_output_item, or the name of one.

Value

TRUE or an error.

Examples

1
2
3
4
5
is_valid(context$study,
  input_item$study_id$name,
  'ST000001',
  output_item$summary$name
)

metabolomicsWorkbenchR documentation built on Nov. 8, 2020, 6:58 p.m.