R convert sf object back to SpatialPolygonsDataFrame
I used
as(nc, 'Spatial')
as part 2 of the vignette by Edzer Pebesma indicated (Scroll to the bottom of the page).
I had to use sf:::as_Spatial()
as workaround.
library(sf)
nc <- st_read(system.file("shape/nc.shp", package="sf"))
# sf -> sp
nc_sp <- as_Spatial(nc$geom) # Error: could not find function "as_Spatial"
nc_sp <- sf:::as_Spatial(nc$geom) # This works
library(sp)
plot(nc_sp)