get_depthbin: Get Depth by Year

View source: R/get_depthbin.R

get_depthbinR Documentation

Get Depth by Year

Description

Get depth of positive and empty tows by year plotted in a histogram.

Usage

get_depthbin(df, vline = 366)

Arguments

df

A data frame from the NWFSC warehouse.

vline

The x-axis location of the vertical line. The default is to include a line at 366 m because of the change in sampled depths in the Triennial Survey. A value of vline = NULL will remove the line from the plot.

Value

A ggplot object.

Author(s)

Kelli F. Johnson

Examples

get_depthbin(Database)
## Not run: 
tridata <- nwfscSurvey::PullCatch.fn(SurveyName = "Triennial")
tridata[, "Catch_KG"] <- tridata[, "total_catch_wt_kg"]
for (ii in unique(tri$Common_name)) {
  dd <- subset(tri, Common_name == ii)
  if (nrow(dd) == 0) next
  g <- get_depthbin(dd)
  g <- g + ggtitle(ii)
  ggsave(g, file = paste0(tempdir(), "Tri_", ii, ".png"))
}

## End(Not run)


nwfsc-assess/VAST_WestCoast documentation built on July 4, 2023, 5:45 p.m.