Learn R Programming

atlantistools (version 0.4.3)

load_spec_mort: Load mortality information from outputSpecificPredMort.txt

Description

Load mortality information from outputSpecificPredMort.txt

Usage

load_spec_mort(specmort, prm_run, fgs, convert_names = FALSE,
  version_flag = 2)

Arguments

specmort

Character string giving the connection of the specific mortality file. The filename usually contains SpecificPredMort and ends in .txt".

prm_run

Character string giving the connection of the run parameterfile. The filename usually contains run_fishing and ends in .prm".

fgs

Character string giving the connection to the functional groups file. The filename usually contains Groups and does end in .csv.

convert_names

Logical indicating if group codes are transformed to LongNames (TRUE) or not (default = FALSE).

version_flag

The version of ATLANTIS model. 1 for bec_dev, 2 for trunk. default is 2..

Value

Dataframe with information about ssb in tonnes and recruits in thousands.

See Also

Other load functions: load_box, load_bps, load_dietcheck, load_fgs, load_init_age, load_init, load_nc_physics, load_nc, load_rec, load_txt

Examples

Run this code
# NOT RUN {
d <- system.file("extdata", "setas-model-new-becdev", package = "atlantistools")
specmort <- file.path(d, "outputSETASSpecificPredMort.txt")
prm_run <- file.path(d, "VMPA_setas_run_fishing_F_New.prm")
fgs <- file.path(d, "SETasGroups.csv")

df <- load_spec_mort(specmort, prm_run, fgs, version_flag = 1)
head(df)

d <- system.file("extdata", "setas-model-new-trunk", package = "atlantistools")
specmort <- file.path(d, "outputSETASSpecificPredMort.txt")
prm_run <- file.path(d, "VMPA_setas_run_fishing_F_Trunk.prm")
fgs <- file.path(d, "SETasGroupsDem_NoCep.csv")

df <- load_spec_mort(specmort, prm_run, fgs)
head(df)
# }

Run the code above in your browser using DataLab