spT.subset {spTimer} | R Documentation |
Select a subset of Spatial data.
Description
This command selects a subset of the dataset using the site numbers.
Usage
spT.subset(data, var.name, s = NULL, reverse = FALSE)
Arguments
data |
The dataset. |
var.name |
The name of the variable for which data will be sub-setted, e.g., "s.index". |
s |
The site numbers to be selected/deselected based on the argument |
reverse |
Logical value: if TRUE then |
See Also
Examples
##
# Load ozone concentration data for New York.
data(NYdata)
NYdata
# Choose sites 2, 8, and 12.
subdata<-spT.subset(data=NYdata, var.name=c("s.index"), s=c(2,8,12))
# Do not choose purposively defined sites numbered as 2, 8, and 12.
subdata<-spT.subset(data=NYdata, var.name=c("s.index"), s=c(2,8,12), reverse=TRUE)
##
[Package spTimer version 3.3.2 Index]