gmGeostats (version 0.10-6)

stackDim: 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 DataFrameStack stackDim(x, ...)

noStackDim(x, ...)

# S3 method for default noStackDim(x, ...)

stackDim(x) <- value

# S3 method for default 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

  • stackDim.DataFrameStack: Get/set name/index of (non)stacking dimensions

  • noStackDim: Get/set name/index of (non)stacking dimensions

  • noStackDim.default: Get/set name/index of (non)stacking dimensions

  • stackDim<-: Get/set name/index of (non)stacking dimensions

  • stackDim<-.default: Get/set name/index of (non)stacking dimensions

Examples

Run this code
# NOT RUN {
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)
# }

Run the code above in your browser using DataLab