I would like to create a sf() object from the streamstats function delineateWatershed() without first needing to save as shapefiles of jsons. I can delineate the polygon, then save as a shape, and finally import back in as a shapefile. This leaves me with a version of the shape file in a nested folder, which will quickly take up space. Once I have my sf() polygons I plan to merge multiple together and save them as a single shapefile. In the end I will have two copies of the polygons. How can I skip the writeShapefile() then st_read step?
setwd('~/R/GIS/data/') #I need to define the working directory for writeShapefile()
ws <- delineateWatershed(xlocation = -123.9637, ylocation = 40.06269, crs = 4326)
##writeShapefile(watershed = ws, layer = "name of shape file", "name of folder in dir", what='boundary')
writeShapefile(watershed = ws, layer = "shed", "data", what = 'boundary')
ws_sf <- st_read("~/R/GIS/data/shed.shp")