| 1 |
\name{dimensions-methods} |
| 2 |
\docType{methods} |
| 3 |
\alias{dimensions,Spatial-method} |
| 4 |
\alias{dimensions} |
| 5 |
|
| 6 |
\title{ retrieve spatial dimensions from spatial data} |
| 7 |
\description{ |
| 8 |
retrieves spatial dimensions box from spatial data |
| 9 |
} |
| 10 |
\usage{ |
| 11 |
dimensions(obj) |
| 12 |
} |
| 13 |
\arguments{ |
| 14 |
\item{obj}{ object deriving from class "Spatial" } |
| 15 |
} |
| 16 |
\section{Methods}{ |
| 17 |
\describe{ |
| 18 |
\item{obj = "Spatial"}{ object deriving from class "Spatial" } |
| 19 |
}} |
| 20 |
\value{ two-column matrix; the first column has the minimum, |
| 21 |
the second the maximum values; rows represent the spatial |
| 22 |
dimensions} |
| 23 |
\keyword{methods} |
| 24 |
\examples{ |
| 25 |
# just 9 points on a grid: |
| 26 |
x <- c(1,1,1,2,2,2,3,3,3) |
| 27 |
y <- c(1,2,3,1,2,3,1,2,3) |
| 28 |
xy <- cbind(x,y) |
| 29 |
S <- SpatialPoints(xy) |
| 30 |
dimensions(S) |
| 31 |
|
| 32 |
# data.frame |
| 33 |
data(meuse.grid) |
| 34 |
coordinates(meuse.grid) <- ~x+y |
| 35 |
gridded(meuse.grid) <- TRUE |
| 36 |
dimensions(meuse.grid) |
| 37 |
|
| 38 |
} |
| 39 |
\keyword{methods} |