stackDim {gmGeostats}R Documentation

Get/set name/index of (non)stacking dimensions

Description

Return (or set) the name or index of either the stacking dimension, or else of the non-stacking dimension (typically, the dimension runing through the variables)

Usage

stackDim(x, ...)

## S3 method for class 'DataFrameStack'
stackDim(x, ...)

noStackDim(x, ...)

## Default S3 method:
noStackDim(x, ...)

stackDim(x) <- value

## Default S3 replacement method:
stackDim(x) <- value

Arguments

x

a DataFrameStack() object, (only for stackDim it can also be a Spatial object which data slot is a DataFrameStack)

...

extra arguments for generic functionality

value

the name or the index to be considered as stacking dimension

Value

the index or the name of the asked dimension.

Functions

Examples

ar = array(1:30, dim = c(5,2,3), dimnames=list(obs=1:5, vars=c("A","B"), rep=1:3))
dfs = DataFrameStack(ar, stackDim="rep")
dfs
stackDim(dfs)
noStackDim(dfs)
getStackElement(dfs, 1)
stackDim(dfs) <- "vars"
getStackElement(dfs, 1)

[Package gmGeostats version 0.11.3 Index]