rings {sp}R Documentation

sets spatial coordinates to create spatial data, or retrieves spatial coordinates

Description

sets spatial coordinates to create spatial data, or retrieves spatial coordinates

Usage

        rings(obj)
        rings(object) <- value

Arguments

obj object of class "SpatialRingsDataFrame"
object object of class "data.frame"
value object of class "SpatialRings"

Value

rings returns the SpatiaRings of obj; rings<- promotes a data.frame to a SpatialRingsDataFrame object

Examples

data(ncshp)
nc1 <- as.SpatialRings.Shapes(nc.shp$Shapes, as.character(nc.shp$att.data$FIPS))
df <- nc.shp$att.data
rownames(df) <- df$FIPS
rings(df) <- nc1
class(df)

[Package sp version 0.7-8 Index]