[.DataFrameStack {gmGeostats} | R Documentation |
Extract rows of a DataFrameStack
Description
Extract rows (and columns if you know what you are doing) from a stacked data frame
Usage
## S3 method for class 'DataFrameStack'
x[i = NULL, j = NULL, ..., drop = FALSE]
Arguments
x |
|
i |
row indices, names or logical vector of appropriate length (i.e. typically locations, observations, etc) |
j |
column indices, names or logical vector of appropriate length. DO NOT USE if you are not sure what you are doing. The result will be a conventional data.frame, probably with the stacking structure destroyed. |
... |
generic parameters, ignored. |
drop |
logical, if selection results in one single row or column selected, return a vector? |
Value
the DataFrameStack or data.frame of the selected rows and columns.
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[1:2,]
stackDim(dfs[1:2,])
[Package gmGeostats version 0.11.3 Index]