View source: R/gmDataFrameStack.R
getStackElement | R Documentation |
Set or get one element of the DataFrameStack()
getStackElement(x, i, ...)
## Default S3 method:
getStackElement(x, i, ...)
## S3 method for class 'list'
getStackElement(x, i, ...)
## S3 method for class 'DataFrameStack'
getStackElement(x, i, MARGIN = stackDim(x), ...)
## Default S3 method:
setStackElement(x, i, value, ...)
## S3 method for class 'data.frame'
setStackElement(x, i, value, ...)
## S3 method for class 'list'
setStackElement(x, i, value, ...)
## S3 method for class 'DataFrameStack'
setStackElement(x, i, value, MARGIN = stackDim(x), ...)
x |
container data, typically a |
i |
index (or name) of the element of the stack to extract or replace |
... |
extra arguments for generic functionality |
MARGIN |
which dimension is the stacking dimension? you seldom want to touch this!! |
value |
for the setting operation, the new data.frame to replace the selected one; note
that the compatibility of the dimensions of |
For the getters, the result is the data.frame of the stack asked for. For the setters the result is the original DataFrameStack with the corresponding element replaced. Spatial methods return the corresponding spatial object, ie. the spatial information of the stack is transferred to the extracted element.
default
: Set or get one element of the DataFrameStack()
list
: Set or get one element of the DataFrameStack()
DataFrameStack
: Set or get one element of the DataFrameStack()
default
: Set or get one element of the DataFrameStack()
data.frame
: Set one element of the DataFrameStack()
in data.frame form
list
: Set get one element of a DataFrameStack()
in list form
DataFrameStack
: Set one element of the DataFrameStack()
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)
getStackElement(dfs, 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.