Hello!
I'm a complete beginning with R - :S
I received a .rds file which I know contains 4 polygons - I would like to convert them to ESRI shapefiles. I searched for how to do this and tried the following:
library(rgdal)
library(sp)
x <- readRDS("path/to/the/rds_file.rds")
rgdal::writeOGR(x, "path/to/destination", "filename", driver = "ESRI Shapefile")
But I always get the following error:
Error: inherits(obj, "Spatial") is not TRUE
The outputs for classof(x) and type(x) are both lists.
Can anyone help me?