Learn R Programming

spTimer (version 0.02)

spT.data.selection: Selection of Spatial data from a big dataset.

Description

This command selects a part of the big spatial dataset using the site numbers.

Usage

spT.data.selection(data, random = TRUE, num.rs = NULL, 
                     s = NULL, reverse=FALSE)

Arguments

data
The dataset.
random
Logical value: if TRUE then the num.rs sites are randomly sampled, if FALSE then we need to provide the value for s.
num.rs
The number of sites to be selected, e.g., 3.
s
The site numbers to be selected, e.g., c(2,8,12).
reverse
Logical value: if TRUE then num.rs will be discarded from the data.

See Also

NYdata, NYsite.

Examples

Run this code
##

# Load ozone concentration data for New York.

data(NYdata)	
NYdata	

# Sample 4 sites randomly from the data NYdata.

r4<-spT.data.selection(data=NYdata, random=TRUE, num.rs=4)

# Choose purposively defined sites numbered as 2, 8, and 12.

p4<-spT.data.selection(data=NYdata, random=FALSE, s=c(2,8,12))
   
# Donot choose purposively defined sites numbered as 2, 8, and 12.

p4<-spT.data.selection(data=NYdata, random=FALSE, s=c(2,8,12), reverse=TRUE)
   
##

Run the code above in your browser using DataLab