Preparing runs and reading input files

The following functions allow (i) read the various input files and (ii) create folders (and clean them) needed for the runs.

Functions to read input files

readGMACSfiles()

Read all the GMACS input files

readGMACS.dat()

Read the gmacs.dat file

readGMACSdat()

Read the GMACS data file

readGMACSctl()

readGMACSctl

readGMACSprj()

readGMACSprj

GMACSversion()

Function to extract the Version number of GMACS

Functions to create specific folders and clean output files from GMACS

SetGMACSfold()

Create the needed folders to run GMACS

clean_bat()

Clean gmacs output files in a folder

clean_files()

Clean files in a folder

clean_root()

Clean gmacs compilation-process files in the "root folder"

clean_bat_Sim()

Clean the output files of the Gmacs simulation module

Functions to (re)write the input/output files

writeGmacs.dat()

Write the gmacs.dat file

writeGmacsdatfile()

Write data file

writeGmacsctlfile()

Write the control file

writeGmacsprjfile()

Write the projection file

writeGmacsPAR()

Write the gmacs.par file

Conducting a stock assessment using GMACS

Set of functions for working with GMACS while realizing specific tasks (building the gmacs executable, running a stock assessment for one or several stocks, making comparisons between model versions).

GMACS()

GMACS

Do_GMACS()

Do_GMACS

Do_Comp()

Do_Comp

.GetGmacsExe()

.GetGmacsExe

createGmacsExe()

Create the Gmacs executable from the tpl file

.buildGMACS()

.buildGMACS

write_TPL()

write_TPL

copy_GMACSinputs()

Copy specific GMACS input files

Updating a version of GMACS for a new release

Set of functions for implementing and releasing a new version (including making comparison)

Do_Comp()

Do_Comp

UpdateGMACS()

UpdateGMACS

Realizing a simulation-estimation analysis

Set of functions to generate simulated data and realize estimations in the context of a simulation-estimation approach.

prepSim()

Get the original input files for the simulation approach

GenSimFiles()

Generate the input files to get the simulated data for each simulation

SimData()

Generate the simulated data

SaveSimFiles()

Save the outputs of each simulation-estimation run

Gen_GmacsSim()

Generates the simulated data for a set of simulation

RunGmacsSim()

Run the GMACS simulation-estimation

Manipulating outputs from the GMACS function

The following functions allow to read GMACS outputs and manipulate the results. These functions are called in the graphical functions.

Read GMACS outputs

readGMACSpar()

readGMACSpar

readGMACSallOUT()

Read GmacsAll.out

readGMACSrep()

Read Gmacs.rep

readGMACSsimdat()

readGMACSsimdat

read_admb()

Read ADMB output files

read_fit()

Read ADMB .par, .std, and .cor file and return an R object of type 'list' of estimates and correlations

read_rep()

Read ADMB .rep file

read_psv()

Read ADMB .psv file

read_ctl()

Read ADMB .ctl file

read.OUT()

read.OUT

Manipulate GMACS results

.get_cpue_df()

Get cpue or other indices

.get_catch_df()

Get observed and predicted catch values

.get_gi_df() .get_gi_df()

Get growth increment data

.get_F_df()

Get F parameters

.get_dynB0_df()

Extract spawning stock biomass (ssb) from gmacs run

.get_length_weight_df()

Get length-weight data

.get_maturity_df()

Get maturity data

.get_mnLen_df()

Get observed and predicted mean lengths

.get_molt_prob_df()

Get molting probability data

.get_M_df()

Get natural mortality data

.get_numbers_df()

Get numbers at length data

.get_recruitment_df()

Get recruitment data

.get_recruitment_size_df()

Get recruitment size distribution data

.get_selectivity_df()

Get the selectivity data

.get_sizeComps_df()

Get observed and predicted size composition values

.get_ssb_df()

Extract spawning stock biomass (ssb) from gmacs run

Making results tables

The following functions can be used to create tables of catches, likelihoods and reference points

table_catch()

Create a table of catches

table_likelihoods()

Create a table of likelihoods

table_penalties()

Create a table of penalties

table_priors()

Create a table of priors

table_spr()

Create a table of SPR reference points

Creating plots

The following functions are awesome for creating plots of data and model fits, model outputs estimates (biological, fisheries and, demographic parameters), model residuals and, stock status.

Do all plots from gmr

plot_gmr()

Do all gmr plots

plot_basicOutput()

Plotting the basic outputs of GMACS

shiny_gmacs()

Plot Gmacs on shiny app

Plotting data used and model fits

plot_datarange()

Plot data range by fleet and year

plot_cpue()

Plot cpue or other indices

plot_catch() plot_catch()

Plot observed and predicted catch values

plot_size_comps()

Plot fits to size composition data

plot_size_ridges()

Plot fits to size composition data

Plotting Biological parameters

plot_growth_inc() plot_growth_inc()

Plot growth from arbitrary start age

plot_growth()

Plot growth from arbitrary start age

plot_length_weight()

Plot length-weight relationship

plot_length_maturity()

Plot length-maturity relationship

plot_molt_prob()

Plot molting probability relationship

plot_growth_transition()

Plot growth transition

plot_size_transition()

Plot size transition

Plotting Fisheries parameters

plot_F()

Plot fishing mortality

plot_fishing_mortality()

Plot fishing mortality (F)

plot_selectivity()

Plot selectivity

plot_selectivity_3d()

Plot selectivity 3D

Plotting Demographic parameters

plot_dynB0()

Plot predicted spawning stock biomass (ssb)

plot_natural_mortality()

Plot natural mortality

plot_numbers()

Plot numbers at length

plot_recruitment()

Plot predicted recruitment and approximate asymptotic error-bars

plot_recruitment_size()

Plot recruitment size distribution

plot_models_recruitment()

Plot predicted recruitment across model runs

plot_ssb()

Plot predicted spawning stock biomass (ssb)

Plotting Model residuals

plot_cpue_res()

Plot residuals of cpue or other indices

plot_size_comps_res()

Plot fits to size composition data

Plotting Stock Status

plot_kobe()

Plot predicted spawning stock biomass (ssb)

Terminals

These functions allow the user to launch a scpecific command in a R Terminal.

.CallTerm()

.CallTerm

Plotting options and ggplot utilities

Set of functions for settings the type of plot, the rezolution, the size and disposition of the graphics as well as the colors.

.gmr_options

GMR plotting options

BaseThemeGMR()

Base theme for plotting with gmr

.cbPalette1

The color-blind friendly palette with grey

.cbPalette2

The color-blind friendly palette with black

set_ggtheme()

Set plotting theme for ggplot2 via gmr

plot_type()

Specify the type of plot you would like to create

multiplot()

Multi-Plot utility for ggplot2 ggplot objects can be passed in ..., or to plotlist (as a list of ggplot objects) - cols: Number of columns in layout - layout: A matrix specifying the layout. If present, 'cols' is ignored.

plot_multiple()

Plot multiple figures on a page