Format stock assessment output file to a standardized tibble.

convert_output(file, model = NULL, fleet_names = NULL, save_dir = NULL)

Arguments

file

Path. Assessment model output file path. Currently accepts SS3 Report.sso file, BAM .rda file, Rceattle model object, and FIMS model object.

model

String. Assessment model used in evaluation

Default: NULL

Options: "ss3", "bam", "fims", "rceattle"

fleet_names

Character vector. Names of fleets in the assessment model as shortened in the output file or names of fleets to replace the native fleet names in the output. For example, if fleet names in the model are 1, 2, 3 then fleet_names = c("fleet1" = 1, "fleet2" = 2, "fleet3" = 3).

Default: NULL

save_dir

Path. Full file path to save the converted output file. If saved file name is not indicated, the file will be saved as "std_output.rda" in the file path provided.

Default: NULL

Value

A reformatted and standardized tibble of assessment model results for application in building stock assessment reports and to easily adapt results among regional assessments.

Details

The resulting object is a long-format, transformed and machine readable version of a model output file. Converted data frame is always returned. It will also be saved if save_dir is not NULL.

Author

Samantha Schiano

Examples

if (FALSE) { # \dontrun{
convert_output(
  file = here::here("model1", "Report.sso"),
  model = "ss3",
  fleet_names = c("TWL", "NONTWL"),
  save_dir = here::here("standard_output.rda")
)
} # }