get.one {RGeostats}R Documentation

Get one element from an array

Description

Returns one element from an array

Usage

get.one(tab, rank, ntab, start=1, change=TRUE)

Arguments

tab

Input array of values

rank

Rank of the element in the array

ntab

Number of expected values in the array

start

If the array tab is not provided and if start is provided, the default contents of the array tab is generated as the sequence of values starting from start.

change

When the array tab is not provided, the array tab is generated automatically. When change=TRUE, the values in tab are incremental (starting from start). When change=FALSE, the values are constantly set to the value start.

Details

When the input array is missing, it is generated as the sequence of values from 1 to ntab. When an input array is provided, its length is compared to the argument ntab. If its length is larger than ntab, the input array is truncated to the ntab first elements. It its length is smaller than ntab, the input array is repeated until the dimension ntab is reached. Then the 'rank'-th value of the array is returned.

Value

The 'rank'-th element of the input array


[Package RGeostats version 11.1.2 Index]