From 4063d9d7e3d78330f66982153315ac1716fb8e48 Mon Sep 17 00:00:00 2001 From: sbreitbart-NOAA <181890943+sbreitbart-NOAA@users.noreply.github.com> Date: Thu, 18 Jun 2026 15:43:05 +0000 Subject: [PATCH] style and docs: run devtools::document() and style with styler or air --- DESCRIPTION | 3 ++- man/gt_split.Rd | 8 ++++---- vignettes/articles/example_reports.qmd | 22 ++++++++++++---------- 3 files changed, 18 insertions(+), 15 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 7c1586c1..942b6256 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -16,7 +16,8 @@ Description: Build a full or update stock assessment report for any stock assessment model. Parameterization allows the user to call a template based on their regional science center, species, area, ect. License: MIT + file LICENSE -URL: https://github.com/nmfs-ost/asar, https://noaa-fisheries-integrated-toolbox.r-universe.dev/asar +URL: https://github.com/nmfs-ost/asar, + https://noaa-fisheries-integrated-toolbox.r-universe.dev/asar BugReports: https://github.com/nmfs-ost/asar/issues Depends: R (>= 4.1.0) diff --git a/man/gt_split.Rd b/man/gt_split.Rd index c04cd18c..5875f287 100644 --- a/man/gt_split.Rd +++ b/man/gt_split.Rd @@ -12,7 +12,7 @@ gt_split(data, row_every_n = NULL, row_slice_i = NULL, col_slice_at = NULL) \verb{obj:} // \strong{required} This is the \strong{gt} table object that is commonly created through use of the -\code{\link[gt:gt]{gt::gt()}} function.} +\code{\link[gt:gt]{gt()}} function.} \item{row_every_n}{\emph{Split at every n rows} @@ -59,7 +59,7 @@ version of this function. \section{Examples}{ -Use a subset of the \code{\link[gt:gtcars]{gt::gtcars}} dataset to create a \strong{gt} table. Format the +Use a subset of the \code{\link[gt:gtcars]{gtcars}} dataset to create a \strong{gt} table. Format the \code{msrp} column to display numbers as currency values, set column widths with \link[gt]{cols_width}, and split the table at every five rows with \code{gt_split()}. This creates a \code{gt_group} object containing two tables. Printing this object @@ -77,9 +77,9 @@ yields two tables separated by a line break. gt_split(row_every_n = 5) }\if{html}{\out{}} -Use a smaller subset of the \code{\link[gt:gtcars]{gt::gtcars}} dataset to create a \strong{gt} table. +Use a smaller subset of the \code{\link[gt:gtcars]{gtcars}} dataset to create a \strong{gt} table. Format the \code{msrp} column to display numbers as currency values, set the table -width with \code{\link[gt:tab_options]{gt::tab_options()}} and split the table at the \code{model} column This +width with \code{\link[gt:tab_options]{tab_options()}} and split the table at the \code{model} column This creates a \code{gt_group} object again containing two tables but this time we get a vertical split. Printing this object yields two tables of the same width. diff --git a/vignettes/articles/example_reports.qmd b/vignettes/articles/example_reports.qmd index d5df8541..f0662826 100644 --- a/vignettes/articles/example_reports.qmd +++ b/vignettes/articles/example_reports.qmd @@ -33,16 +33,19 @@ library(stockplotr) output <- stockplotr::convert_output( file = system.file("extdata", "Report.sso", package = "asar"), model = "ss3", - save_dir = here::here("readme_output.rda")) + save_dir = here::here("readme_output.rda") +) # make example figure and table plot_fishing_mortality(output, - module = "CATCH", - make_rda = TRUE) + module = "CATCH", + make_rda = TRUE +) table_landings(output, - module = "CATCH", - make_rda = TRUE) + module = "CATCH", + make_rda = TRUE +) # make basic report create_template( @@ -52,10 +55,10 @@ create_template( species = "Petrale sole", spp_latin = "Eopsetta jordani", year = 2025, - authors = c("Ian G. Taylor"="NWFSC", "Vladlena Gertseva"="NWFSC", "Nick Tolimieri"="NWFSC"), + authors = c("Ian G. Taylor" = "NWFSC", "Vladlena Gertseva" = "NWFSC", "Nick Tolimieri" = "NWFSC"), include_affiliation = TRUE, simple_affiliation = FALSE, - param_names = c("nf","sf"), + param_names = c("nf", "sf"), param_values = c("North fleet", "South fleet"), model_results = here::here("readme_output.rda") ) @@ -72,11 +75,10 @@ exec_sum_new <- append(exec_sum, example_text) writeLines( exec_sum_new, fs::path("report", "01_executive_summary.qmd") - ) +) # render report quarto::quarto_render(fs::path("report", "sar_USWC_Petrale_sole_skeleton.qmd")) - ``` ```{r} @@ -90,7 +92,7 @@ file.copy( to = fs::path("../../pkgdown/assets"), overwrite = TRUE ) -# +# # file.remove("key_quantities.csv") # file.remove("captions_alt_text.csv") # file.remove(here::here("readme_output.rda"))