Extract.fasp {spatstat.explore} | R Documentation |
Extract Subset of Function Array
Description
Extract a subset of a function array (an object of class
"fasp"
).
Usage
## S3 method for class 'fasp'
x[I, J, drop=TRUE,...]
Arguments
x |
A function array. An object of class |
I |
any valid expression for a subset of the row indices of the array. |
J |
any valid expression for a subset of the column indices of the array. |
drop |
Logical.
When the selected subset consists of only one cell of the array,
if |
... |
Ignored. |
Details
A function array can be regarded as a matrix whose entries
are functions. See fasp.object
for an explanation of
function arrays.
This routine extracts a sub-array according to the usual conventions for matrix indexing.
Value
A function array (of class "fasp"
).
Exceptionally, if the array has only one cell, and
if drop=TRUE
, then the result is a function value table
(class "fv"
).
Author(s)
Adrian Baddeley Adrian.Baddeley@curtin.edu.au, Rolf Turner rolfturner@posteo.net and Ege Rubak rubak@math.aau.dk
See Also
Examples
online <- interactive()
# Lansing woods data - multitype points with 6 types
X <- lansing
if(!online) {
# subsample data (from 2251 to 450 points) to shorten check time
X <- X[c(FALSE,FALSE,FALSE,FALSE,TRUE)]
}
a <- alltypes(X, 'K')
# extract first three marks only
b <- a[1:3,1:3]
if(online) {plot(b)}
# subset of array pertaining to hickories
h <- a["hickory", ]
if(online) {plot(h)}