I want to convert R 'library:raster' 'extent' object to a shapefile. I have the CRS available too.
e= c(4304916, 4305325, 365216, 365439)#xmin, xmax, ymin, ymax
proj4string(e) = CRS("+proj=utm +zone=18 +ellps=GRS80 +datum=NAD83 +units=m +no_defs")
In older version of raster data there was a specific function "" 'extentTopolygon' which is depreciated now. My current approach is to create a raster object change its projection and assign the current extent and convert it to shapefile, which is not very efficient. Any help is highly appreciated.