\HeaderA{coordinates}{sets spatial coordinates to create spatial data, or retrieves
spatial coordinates}{coordinates}
\aliasA{coordinates<\Rdash}{coordinates}{coordinates<.Rdash.}
\keyword{manip}{coordinates}
\begin{Description}\relax
sets spatial coordinates to create spatial data, or retrieves
spatial coordinates
\end{Description}
\begin{Usage}
\begin{verbatim}
        coordinates(obj)
        coordinates(object) <- value
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{obj}] object deriving from class "Spatial" 
\item[\code{object}] object of class "data.frame" 
\item[\code{value}] spatial coordinates; either a matrix, list, or data
frame with numeric data, or column names, column number or a
reference: a formula (in the form of e.g. \code{\textasciitilde{}x+y}), column numbers
(e.g. \code{c(1,2)}) or column names (e.g. \code{c("x","y")}) specifying
which columns in \code{object} are the spatial coordinates. If the coordinates
are part of object, giving the reference does not duplicate them, giving
their value does duplicate them in the resulting structure.

\end{ldescription}
\end{Arguments}
\begin{Value}
an object of class SpatialPointsDataFrame
\end{Value}
\begin{Examples}
\begin{ExampleCode}
# data.frame
data(meuse.grid)
coordinates(meuse.grid) <- ~x+y
gridded(meuse.grid) <- TRUE
bbox(meuse.grid)

\end{ExampleCode}
\end{Examples}

