
Last chance! 50% off unlimited learning
Sale ends in
Set or get one element of the DataFrameStack()
getStackElement(x, i, ...)# S3 method for default
getStackElement(x, i, ...)
# S3 method for list
getStackElement(x, i, ...)
# S3 method for DataFrameStack
getStackElement(x, i, MARGIN = stackDim(x), ...)
# S3 method for default
setStackElement(x, i, value, ...)
# S3 method for data.frame
setStackElement(x, i, value, ...)
# S3 method for list
setStackElement(x, i, value, ...)
# S3 method for DataFrameStack
setStackElement(x, i, value, MARGIN = stackDim(x), ...)
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.
container data, typically a DataFrameStack()
, but it can also be certain sp::Spatial()
object derivates of it
index (or name) of the element of the stack to extract or replace
extra arguments for generic functionality
which dimension is the stacking dimension? you seldom want to touch this!!
for the setting operation, the new data.frame to replace the selected one; note
that the compatibility of the dimensions of value
is only checked for setStackElement.DataFrameStack
and its Spatial derivates; for other methods setStackElement
can break the consistency of the
stack!
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)
Run the code above in your browser using DataLab