XArray-class | R Documentation |
Template for construction of virtual arrays ('VirtualArray
') and a derived class ('XArray
') to instantiate it with general objects.
stack |
A |
index |
A |
dim |
A |
The 'VirtualArray
' class implements structures to organize objects of the same class in multidimensional arrays. Subsetting rules were defined using the proxy object in the index
slot. The 'VirtualArray
' is the base class for 'XArray
' and 'RasterArray
' classes.
The 'XArray
' class derived from VirtualArray
allows the instantiation of basic virtual arrays with genearl R objects, which form a single list
in the @stack slot
. The 'SfArray
' class is derived from the 'XArray
' class.
The class has two slots:
@stack
: A list containing objects of the same class (i.e. layers).
@index
: A proxy object that represents the structure of the entities.
An XArray
-class object.
# 2d XArray of vectors
data(exemplar)
st <-exemplar@stack
ind <- 1:nlayers(st)
dim(ind) <- c(3,4)
dimnames(ind) <- list(n = c(10, 20, 30), seed = 1:4)
xa<- XArray(stack=st, index=ind)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.