load_extra_mcmc_get_parameter_chunk: Extracts a vector of lines of data or output (a chunk) from...

View source: R/load-extra-mcmc-get-parameter-chunk.R

load_extra_mcmc_get_parameter_chunkR Documentation

Extracts a vector of lines of data or output (a chunk) from each element of a list of identically-formatted vectors, typically read in from files with identical formats (SS3 Report files).

Description

Extracts a vector of lines of data or output (a chunk) from each element of a list of identically-formatted vectors, typically read in from files with identical formats (SS3 Report files).

Usage

load_extra_mcmc_get_parameter_chunk(lst, beg_pat, end_pat, ...)

Arguments

lst

A list of identically-formatted vectors, typically from a call to readLines() where each file is identically-formatted

beg_pat

A regular expression that marks the beginning of the chunk of data (the first line to include) in the PARAMETERS section

end_pat

A regular expression that marks the last line of data to include in the PARAMETERS section

Details

This function is different from the load_extra_mcmc_get_chunk() function in the output it reads in. The former reads in outputs that each have their own header associated with it, this function reads in output found in the PARAMETERS section of the Report_mce_xxx.sso files which have a shared header at the top and are each listed below that. The header must be found and read in and attached to the outputs requested through the beg_pat and end_pat regular expressions.

Value

A list of tibble::tibble() of output or data, each tibble will have the exact same dimensions and column names


pacific-hake/hake-assessment documentation built on Nov. 8, 2024, 1:16 p.m.