spTimer (version 3.3)

spT.subset: 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, e.g., c(2,8,12).

reverse

Logical value: if TRUE then num.rs will be discarded from the data.

See Also

NYdata.

Examples

Run this code
# NOT RUN {
<!-- %\dontrun{ -->
# }
# NOT RUN {
##

# 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)
   
##
# }
# NOT RUN {
<!-- %} -->
# }

Run the code above in your browser using DataCamp Workspace