spT.subset: Select a subset of Spatial data.

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

reverse

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

See Also

NYdata.

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)
   
##


spTimer documentation built on Sept. 11, 2024, 6:25 p.m.