get.grid.sorting {RGeostats}R Documentation

Returns your grid indices in Geoslib order

Description

Returns your grid indices in Geoslib order

Usage

get.grid.sorting(nx, order = 0, verbose = FALSE)

Arguments

nx

Array of grid dimensions. It fixes the dimension of the space and the total number of grid cells ('ncell')

order

Array giving your grid order (See details)

verbose

Verbose flag

Details

The idea is to provide the rank of the indices (for the internal sorting method within Geoslib) for an external array that would be defined in another way. Say that you have an array (defined in dimension 3) with 2 positions along the first axis, 3 along the second index and 4 along the third index.

-> nx = c(2,3,4)

Let us imagine that the values are sorted by increasing first index (internal loop) followed by a decreasing third index and finally an increasing second index.

-> order = "+x1-x3+x2"

Value

This function returns an array 'tab' of indices (Dimension: ncell). For sample #i, tab[i] gives the position that the sample should have in the Geoslib grid organization


[Package RGeostats version 14.0.10 Index]