format_iphc_longest: Format the longest IPHC time series index to agree with other...

View source: R/calc-iphc-ser.R

format_iphc_longestR Documentation

Format the longest IPHC time series index to agree with other surveys

Description

Format the longest IPHC time series index to agree with other surveys so that plot_survey_index() in gfplot (and may get moved to here) works automatically. So the mean catch rate gets renames as ‘biomass’ even though it's numbers per effective skate.

Usage

format_iphc_longest(iphc_set_counts_sp)

Arguments

iphc_set_counts_sp

Output from calc_iphc_full_res() (only actually need the ser_longest component and test_AB).

Value

Renamed ser_longest, with some required columns calculated.

Examples

## Not run: 
# If already loaded data via gfsynopsis then
dat_iphc <- readRDS("../gfsynopsis/report/data-cache/iphc/yelloweye-rockfish.rds")
set_counts <- dat_iphc$set_counts
# Else to load from scratch:
# set_counts <- get_all_iphc_set_counts("yelloweye rockfish")
iphc_set_counts_sp <- calc_iphc_full_res(set_counts)
format_iphc_longest(iphc_set_counts_sp)
# Has no data for early years or 2013:
sp = "china rockfish"
# If already loaded data via gfsynopsis then
dat_iphc <- readRDS("../gfsynopsis/report/data-cache/iphc/china-rockfish.rds")
set_counts <- dat_iphc$set_counts
# Else to load from scratch:
# set_counts <- get_all_iphc_set_counts(sp)
iphc_set_counts_sp <- calc_iphc_full_res(set_counts)
format_iphc_longest(iphc_set_counts_sp)

## End(Not run)

pbs-assess/gfiphc documentation built on July 4, 2023, 1:13 p.m.