get_depthbin | R Documentation |
Get depth of positive and empty tows by year plotted in a histogram.
get_depthbin(df, vline = 366)
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
|
A ggplot object.
Kelli F. Johnson
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.