nmfs-ost / asar

Partially automate a U.S. stock assessment report.
https://nmfs-ost.github.io/asar/
MIT License
15 stars 3 forks source link

Identify key quantities/ref. pts #50

Closed Schiano-NOAA closed 3 weeks ago

Schiano-NOAA commented 2 months ago

Suggestion to build into the template a method for extracting key reference points from the output file (when provided or converted directly in the template). Options of incorporating them into the template is creating a pre-made chunk so users can refer to the numbers using in-line code or set them as parameters in the YAML in addition to species, region, and office (already added as an option).

sb <- output[grep("(?=.*spawning_biomass)(?=.*target)", output$label, perl = TRUE), "estimate"]

yaml <- paste(yaml, "param: \n sbtgt: sb)

Edit:

Key quantities:

(not in any particular order)

Location to place them in create_template.R:

https://github.com/nmfs-ost/asar/blob/890a0c980b47d7d9d48e3c9c3348a38ceae6fa95/R/create_template.R#L549-L554

Schiano-NOAA commented 1 month ago

Added into the create_template fxn as a chunk (commit), but quanitites were not added from the output file yet