View summary and exploratory statistics of selected variable by date and zone.
Usage
spatial_summary(
dat,
project,
stat.var = c("length", "no_unique_obs", "perc_total", "mean", "median", "min", "max",
"sum"),
variable,
spat,
lon.spat = NULL,
lat.spat = NULL,
lon.dat = NULL,
lat.dat = NULL,
cat
)Arguments
- dat
Primary data containing information on hauls or trips. Table in FishSET database contains the string 'MainDataTable'.
- project
String, name of project.
- stat.var
Options are
"length","no_unique_obs","perc_total","mean","median","min","max", and"sum".- variable
Variable in
datto summarize over date and zone.- spat
Spatial data containing information on fishery management or regulatory zones. Shape, json, geojson, and csv formats are supported. Leave as NULL if the variable ‘ZoneID’ assigning observations to zones exists in
dat.- lon.spat
Variable or list from
spatcontaining longitude data. Required for csv files. Leave as NULL ifspatis a shape or json file or if the variable ‘ZoneID’ exists indat.- lat.spat
Variable or list from
spatcontaining latitude data. Required for csv files. Leave as NULL ifspatis a shape or json file, or if the variable ‘ZoneID’ exists indat.- lon.dat
Longitude variable in
dat. Leave as NULL if the variable ‘ZoneID’ (zonal assignment) exists indat.- lat.dat
Latitude variable in
dat. Leave as NULL if the variable ‘ZoneID’ (zonal assignments) exists indat.- cat
Variable or list in
spatthat identifies the individual areas or zones. Ifspatis class sf,catshould be name of list containing information on zones. Leave as NULL if the variable ‘ZoneID’ exists indat.
