subset.mask: Subset Mask Object
Description
Retain selected rows of a mask
object.Usage
## S3 method for class 'mask':
subset(x, subset, ...)
## S3 method for class 'mask':
rbind(...)
Arguments
subset
numeric or logical vector to select rows of mask
...
two or more mask
objects (rbind only)
Value
- For
subset
, an object of class `mask' with only the requested
subset of rows and `type' attribute set to `subset'.
For rbind
, an object of class `mask' with all unique rows from
the masks in ..., and `type' attribute set to `rbind'.
Warning
The spacing attribute is carried over from the input (it is not updated
automatically). In the case of very sparse masks (i.e. those with
isolated points) this may lead to an unexpected value for this
attribute. (Automatic updating requires excessive computation time
and/or memory for very large masks).Details
The subscripts in subset
may be of type integer, character or
logical as described in Extract
.
Covariates are ignored by rbind.mask
.Examples
Run this codetempmask <- make.mask(make.grid())
OK <- (tempmask$x + tempmask$y) > 100
tempmask <- subset(tempmask, subset = OK)
plot(tempmask)
Run the code above in your browser using DataLab