File: select.spatial.Rd

package info (click to toggle)
r-cran-sp 1:0.9-66-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 1,696 kB
  • ctags: 123
  • sloc: ansic: 1,475; sh: 6; makefile: 5
file content (34 lines) | stat: -rw-r--r-- 1,273 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
\name{select.spatial}
\alias{select.spatial}
\title{ select points spatially }
\description{
select a number of points by digitizing the area they fall in
}
\usage{
select.spatial(data, digitize = TRUE, pch = "+", rownames = FALSE)
}
\arguments{
\item{data}{data object of class, or extending \code{SpatialPoints};
this object knows about its x and y coordinate }
\item{digitize}{ logical; if TRUE, points in a digitized polygon
are selected; if FALSE, points identified by mouse clicks are selected }
\item{pch}{plotting character used for points}
\item{rownames}{logical; if FALSE, row (coordinate) numbers are returned;
if TRUE and data contains a data.frame part, row.names for selected points
in the data.frame are returned. }
}
\value{ if rownames == FALSE, array with either indexes (row numbers)
of points inside the digitized polygon; if rownames == TRUE, character
array with corresponding row names in the data.frame part }
\seealso{\link{point.in.polygon}, \link{locator}, 
\link{SpatialPoints-class}, \link{SpatialPointsDataFrame-class}
}
\examples{
data(meuse)
## the following command requires user interaction: left mouse
## selects points, right mouse ends digitizing
data(meuse)
coordinates(meuse) = c("x", "y")
# select.spatial(meuse)
}
\keyword{models}