rings {sp} | R Documentation |
sets spatial coordinates to create spatial data, or retrieves spatial coordinates
rings(obj) rings(object) <- value
obj |
object of class "SpatialRingsDataFrame" |
object |
object of class "data.frame" |
value |
object of class "SpatialRings" |
rings returns the SpatiaRings of obj; rings<- promotes a data.frame to a SpatialRingsDataFrame object
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)