The structure of objects of classes defined in the sp package

The following makes use of the cshapes and sp package. You may need to install the sp package from CRAN using the code install.packages("sp") if you want to run this on your computer. Since version 2.0 of the cshape package, the code below no longer works, so you will need to install version 0.6 from, using the code install.packages("",repos=NULL). As this version of cshapes also depends on the package plyr you may need to install this package using install.packages("plyr").

Loading required package: sp
Loading required package: maptools
Checking rgeos availability: TRUE
Please note that 'maptools' will be retired by the end of 2023,
plan transition at your earliest convenience;
some functionality will be moved to 'sp'.
Loading required package: plyr
cshape.sp <- cshp()
readShapePoly is deprecated; use rgdal::readOGR or sf::st_read
# Obtaining the data for the Gambia from the Cshapes data base
Gambia <- subset(cshape.sp,CNTRY_NAME=="The Gambia")
[1] "SpatialPolygonsDataFrame"
[1] "sp"