Learn R Programming

gstat (version 0.9-22)

select.spatial: select points spatially

Description

select a number of points by digitizing the area they fall in

Usage

select.spatial(x = data$x, y = data$y, data, pch = "+", n = 512)

Arguments

x
numerical array of x-coordinates of points
y
numerical array of y-coordinates of points
data
optional; data frame containing variables x and y
pch
plotting character to be used for points
n
default number of points to locate, can be overridden manually

Value

  • array with indexes (row numbers) of points inside the polygon digitized

See Also

point.in.polygon, locator

Examples

Run this code
data(meuse)
## the following command requires user interaction: left mouse
## selects points, right mouse ends digitizing
# select.spatial(data=meuse)

Run the code above in your browser using DataLab