load_longer: Load CSV files in the 'longer' data format. These files will...

View source: R/load-longer.R

load_longerR Documentation

Load CSV files in the 'longer' data format. These files will have a column for gear, posterior number, and year and many rows. MCMC burnin and thinning is applied to each unique group

Description

Load CSV files in the 'longer' data format. These files will have a column for gear, posterior number, and year and many rows. MCMC burnin and thinning is applied to each unique group

Usage

load_longer(
  fn,
  type = c("age", "sel"),
  gear_names = NULL,
  burnin = 1000,
  thin = 1,
  end_yr = year(Sys.Date()) - 1
)

Arguments

fn

The CSV filename

type

Type of file: 'age' or 'sel'. Used to set the correct start year column name only

gear_names

A vector of gear names to use in the resulting data frame. If NULL, the gear numbers in the file will be used

burnin

The number of MCMC records to remove for burnin period

thin

Remove every nth record for thinning of MCMC output

end_yr

The year to set as the end year for the final year block in selectivity. If there is only one block, this will be the end year for it. This is only used if type is "sel"

Details

Made to load the age fit, age residuals, or selectivity estimates files.

Value

The list of output data frames representing the age fits, age residuals, or selectivity parameter estimates by gear and year


pbs-assess/gfiscamutils documentation built on Oct. 24, 2024, 1:37 p.m.