Load mortality information from outputSpecificPredMort.txt
Source:R/load-spec-pred-mort.R
load_spec_pred_mort.RdLoad mortality information from outputSpecificPredMort.txt
Arguments
- specmort
Character string giving the connection of the specific mortality file. The filename usually contains
SpecificPredMortand ends in.txt".- prm_run
Character string giving the connection of the run parameterfile. The filename usually contains
run_fishingand ends in.prm".- fgs
Character string giving the connection to the functional groups file. The filename usually contains
Groupsand 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..
See also
Other load functions:
load_box(),
load_bps(),
load_dietcheck(),
load_fgs(),
load_init(),
load_init_age(),
load_mort(),
load_nc(),
load_nc_physics(),
load_rec(),
load_spec_mort(),
load_txt()
Examples
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_pred_mort(specmort, prm_run, fgs)
#> Error in dplyr::arrange(tidyr::pivot_longer(data, cols = dplyr::setdiff(names(data), id_col), names_to = "code", values_to = "atoutput"), id_col, code): ℹ In argument: `..1 = id_col`.
#> Caused by error:
#> ! `..1` must be size 1512 or 1, not 4.
head(df)
#>
#> 1 function (x, df1, df2, ncp, log = FALSE)
#> 2 {
#> 3 if (missing(ncp))
#> 4 .Call(C_df, x, df1, df2, log)
#> 5 else .Call(C_dnf, x, df1, df2, ncp, log)
#> 6 }