startR (version 0.0.1)

CircularSort: Circular Sort Dimension Reorder for 'startR'

Description

This is a function that generates a reorder function intended for use as parameter <dim_name>_reorder 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 … of that function.

The applied reordering consists of a circular sort of the coordinate variable values, where any values beyond the limits specified in the parameters start and end is applied a modulus to fall in the specified range. This is useful for circular dimensions such as the Earth longitudes.

Usage

CircularSort(start, end, ...)

Arguments

start

Numeric lower bound of the circular range.

end

Numeric upper bound of the circular range.

Additional parameters to adjust the reorderig (sent internally to the function sort()).

Value

List with the reordered values in the component $x and the permutation indices in the component $ix. See details in the documentation of the parameter … of the function Start().

See Also

Sort

Examples

Run this code
# NOT RUN {
## Check https://earth.bsc.es/gitlab/es/startR for step-by-step examples 
## of Start() that use CircularSort().
# }

Run the code above in your browser using DataLab