Learn R Programming

geozoning (version 1.0.0)

getZonePts: getZonePts

Description

getZonePts

Usage

getZonePts(ptsp, zone)

Arguments

ptsp

SpatialPointsDataFrame with data values

zone

SpatialPolygons defining a zone

Value

a list with components

pts

SpatialPointsDataFrame with the data points within the zone

mask

Logical vector of the within zone data points indices

Details

get all data points within a zone

Examples

Run this code
# NOT RUN {
data(resZTest)
K=resZTest
Z=K$zonePolygone
data(mapTest)
ptsp=mapTest$krigData
res=getZonePts(ptsp,Z[[5]])
plotZ(Z)
points(res$pts,col="blue",pch=20)
# }

Run the code above in your browser using DataLab