Learn R Programming

IceCast (version 2.1.0)

keep_poly: Keep only spatial polygons

Description

Keep only SpatialPolygons from a spatial object.

Usage

keep_poly(my_poly)

Arguments

my_poly

SpatialCollections, SpatialPolygons, SpatialPoints, or SpatialLines object

Value

SpatialPolygons object

Examples

Run this code
# NOT RUN {
par(mfrow = c(1, 2))
plot(spatialCollEx, col = "blue", main = "Spatial Collections Object")
poly_only <- keep_poly(spatialCollEx)
plot(poly_only, col = "blue", main = "Spatial Polygon Only")
# }

Run the code above in your browser using DataLab