Closed slucey closed 3 years ago
Something like...
Let the areaPolygon
= strata
or epu
or an sf object.
Then in swept_Area_biomass
function check for sf class, something like: any(class(area)=="sf")
if FALSE then, check for string = strat
or epu
, read in built in shapefiles and set appropriate areaDescription
if TRUE, then use shapefile passed and areaDescription
we may need to add a bunch of error checking into this function, and provide useful error messages
we should probably also set areaDesription =NULL
as default too.
Right now users need to read in a shapefile then provide it to the function calls. Most of the time we are using either the NEFSC survey strata or the EDAB EPUs which are included in the package. I suggest changing the code to use a keyword (i.e. 'strata' or 'epu') to load in the shapefile as part of the function call rather than separately.