| 1 |
\name{SpatialMultiPointsDataFrame-class} |
| 2 |
\docType{class} |
| 3 |
\alias{SpatialMultiPointsDataFrame-class} |
| 4 |
\alias{[,SpatialMultiPointsDataFrame-method} |
| 5 |
\alias{coerce,SpatialMultiPointsDataFrame,data.frame-method} |
| 6 |
%\alias{coerce,SpatialMultiPointsDataFrame,SpatialMultiPoints-method} |
| 7 |
\alias{coerce,SpatialMultiPointsDataFrame,SpatialPointsDataFrame-method} |
| 8 |
\alias{show,SpatialMultiPointsDataFrame-method} |
| 9 |
\alias{points,SpatialMultiPointsDataFrame-method} |
| 10 |
\alias{coordinates,SpatialMultiPointsDataFrame-method} |
| 11 |
\alias{as.data.frame.SpatialMultiPointsDataFrame} |
| 12 |
\alias{dim.SpatialMultiPointsDataFrame} |
| 13 |
\alias{print.SpatialMultiPointsDataFrame} |
| 14 |
%\alias{as.SpatialMultiPoints.SpatialMultiPointsDataFrame} |
| 15 |
\alias{rbind.SpatialMultiPointsDataFrame} |
| 16 |
\alias{row.names.SpatialMultiPointsDataFrame} |
| 17 |
|
| 18 |
\title{Class "SpatialMultiPointsDataFrame" } |
| 19 |
\description{ Class for spatial attributes that correspond to point sets } |
| 20 |
\section{Slots}{ |
| 21 |
\describe{ |
| 22 |
\item{\code{data}:}{Object of class data.frame containing |
| 23 |
the attribute data (may or may not contain the coordinates in its columns) } |
| 24 |
\item{\code{coords}:}{Object of class \code{"list"}; the list with coordinates matrices; |
| 25 |
points are rows in the matrix, the list length equals the number of rows in the \code{data} slot } |
| 26 |
\item{\code{bbox}:}{Object of class \code{"matrix"}; bounding box} |
| 27 |
\item{\code{proj4string}:}{Object of class \code{"CRS"}; projection string} |
| 28 |
} |
| 29 |
} |
| 30 |
\section{Extends}{ |
| 31 |
Class \code{"SpatialMultiPoints"}, directly. |
| 32 |
Class \code{"Spatial"}, by class \code{"SpatialMultiPoints"}. |
| 33 |
} |
| 34 |
\usage{ |
| 35 |
\S4method{[}{SpatialMultiPointsDataFrame}(x, i, j, ..., drop = TRUE) |
| 36 |
\S4method{coerce}{SpatialMultiPointsDataFrame,data.frame}(from, to, strict=TRUE) |
| 37 |
\S4method{coordinates}{SpatialMultiPointsDataFrame}(obj) |
| 38 |
\S4method{show}{SpatialMultiPointsDataFrame}(object) |
| 39 |
\S4method{points}{SpatialMultiPointsDataFrame}(x) |
| 40 |
} |
| 41 |
\arguments{ |
| 42 |
\item{x,from,obj,object}{\code{SpatialMultiPointsDataFrame} object} |
| 43 |
\item{to}{class to which to coerce} |
| 44 |
\item{strict}{see \code{\link[methods]{as}}} |
| 45 |
\item{i}{row indices} |
| 46 |
\item{j}{column indices} |
| 47 |
\item{drop}{see \code{\link[base]{Extract}}} |
| 48 |
\item{...}{indices passed through} |
| 49 |
} |
| 50 |
\author{ Edzer Pebesma, \email{[email protected]} } |
| 51 |
|
| 52 |
\seealso{ |
| 53 |
\code{\link{coordinates}}, \code{\link{SpatialMultiPoints-class}} |
| 54 |
} |
| 55 |
\examples{ |
| 56 |
# create three sets of points: |
| 57 |
cl1 = cbind(rnorm(3, 10), rnorm(3, 10)) |
| 58 |
cl2 = cbind(rnorm(5, 10), rnorm(5, 0)) |
| 59 |
cl3 = cbind(rnorm(7, 0), rnorm(7, 10)) |
| 60 |
|
| 61 |
mpdf = SpatialMultiPointsDataFrame(list(cl1, cl2, cl3), data.frame(a = 1:3)) |
| 62 |
mpdf |
| 63 |
|
| 64 |
plot(mpdf, col = mpdf$a, cex = 1:3) |
| 65 |
as(mpdf, "data.frame") |
| 66 |
mpdf[1:2,] |
| 67 |
|
| 68 |
} |
| 69 |
\keyword{classes} |