SelectorChecker: Default Selector Checker for 'startR'
Description
This is a selector checker function intended for use as parameter selector_checker in a call to the function Start() in the package 'startR'. This function complies with the input/output interface required by Start() defined in the documentation for the parameter selector_checker of that function.
Usage
SelectorChecker(selectors, var = NULL, return_indices = TRUE, tolerance = NULL)
Arguments
selectors
Numeric indices or variable values to be retrieved for a dimension, automatically provided by Start(). See details in the documentation of the parameters selector_checker and … of the function Start(). The indices or values can be provided in the form of a vector or in the form of a list with two elements.
var
Vector of values of a coordinate variable where to search matches with the provided indices or values in the parameter selectors, automatically provided by Start(). See details in the documentation of the parameters selector_checker and … of the function Start(). The parameter var is optional. When not specified, SelectorChecker simply returns the input indices.
return_indices
Boolean flag, automatically configured by Start(), telling whether to return numeric indices or coordinate variable values after doing the matching.
tolerance
Numeric value with a tolerance value to be used in the matching of the selectors and var. See documentation on <dim_name>_tolerance in …, in the documentation of the function Start().
Value
A vector of either the indices of the matching values (if return_indices = TRUE) or the matching values themselves (if return_indices = FALSE).