\HeaderA{select.spatial}{select points spatially}{select.spatial}
\keyword{models}{select.spatial}
\begin{Description}\relax
select a number of points by digitizing the area they fall in
\end{Description}
\begin{Usage}
\begin{verbatim}
select.spatial(data, digitize = TRUE, pch = "+", rownames = FALSE)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{data}] data object of class, or extending \code{SpatialPoints};
this object knows about its x and y coordinate 
\item[\code{digitize}] logical; if TRUE, points in a digitized polygon
are selected; if FALSE, points identified by mouse clicks are selected 
\item[\code{pch}] plotting character used for points
\item[\code{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. 
\end{ldescription}
\end{Arguments}
\begin{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
\end{Value}
\begin{SeeAlso}\relax
\LinkA{point.in.polygon}{point.in.polygon}, \LinkA{locator}{locator}, 
\LinkA{SpatialPoints-class}{SpatialPoints.Rdash.class}, \LinkA{SpatialPointsDataFrame-class}{SpatialPointsDataFrame.Rdash.class}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
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)
\end{ExampleCode}
\end{Examples}

