SpatialPointsDataFrame-class

0th

Percentile

Class "SpatialPointsDataFrame"

Class for spatial attributes that have spatial point locations

Keywords
classes
Objects from the Class

Objects can be created by calls of the form coordinates(x) = c("x", "y"). or of the form coordinates(x) = xy; see coordinates.

Extends

Class "SpatialPoints", directly. Class "Spatial", by class "SpatialPoints".

See Also

coordinates, SpatialPoints-class

Aliases
  • SpatialPointsDataFrame-class
  • [,SpatialPointsDataFrame-method
  • coerce,SpatialPointsDataFrame,data.frame-method
  • coerce,SpatialPointsDataFrame,SpatialPoints-method
  • show,SpatialPointsDataFrame-method
  • as.data.frame.SpatialPointsDataFrame
  • dim.SpatialPointsDataFrame
  • print.SpatialPointsDataFrame
  • ShowSpatialPointsDataFrame
  • as.SpatialPoints.SpatialPointsDataFrame
  • rbind.SpatialPointsDataFrame
Examples
data(meuse)
xy = meuse[c("x", "y")] # retrieve coordinates as data.frame
class(meuse)
data(meuse) # reload data.frame
coordinates(meuse) = c("x", "y") # specify column names
class(meuse)
data(meuse) # reload data.frame
coordinates(meuse) = c(1, 2) # specify column names
class(meuse)
data(meuse) # reload data.frame
coordinates(meuse) = ~x+y # formula
class(meuse)
data(meuse) # reload data.frame
coordinates(meuse) = xy   # as data frame
class(meuse)
data(meuse) # reload data.frame
coordinates(meuse) = as.matrix(xy)   # as matrix
meuse$log.zn = log(meuse$zinc)
class(meuse)
dim(meuse)
Documentation reproduced from package sp, version 0.9-14, License: GPL version 2 or later

Community examples

Looks like there are no examples yet.