format_final_year_for_map_iphc: Format the final year of IPHC data to use in the spatial map

View source: R/iphc.R

format_final_year_for_map_iphcR Documentation

Format the final year of IPHC data to use in the spatial map

Description

Takes the final year of data to get into the correct format to fit into plotting functions for gfsynopsis report.

Usage

format_final_year_for_map_iphc(set_counts, final_year)

Arguments

set_counts

species-specific set-level data from gfiphc::tidy_iphc_survey()

final_year

year for which to plot the set-by-set catch rates

Value

tibble in the format required by the plotting function, with a row of NA's if the data are not present.

Examples

## Not run: 
# If already loaded data via gfsynopsis then just, for any species,
format_final_year_for_map(
  readRDS("report/data-cache/iphc/china-rockfish.rds")$set_counts)

# Else to load from scratch:
set_counts <- get_all_iphc_set_counts("yelloweye rockfish")
format_final_year_for_map(set_counts, 2017)

## End(Not run)

pbs-assess/gfsynopsis documentation built on March 26, 2024, 7:30 p.m.