spT.subset | R Documentation |
This command selects a subset of the dataset using the site numbers.
spT.subset(data, var.name, s = NULL, reverse = FALSE)
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 |
NYdata
.
##
# 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)
##
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.