Skip to content

Commit

Permalink
update(documentation): and other part of the function for running
Browse files Browse the repository at this point in the history
  • Loading branch information
Schiano-NOAA committed Nov 14, 2024
1 parent 121a9b3 commit 1f424ae
Show file tree
Hide file tree
Showing 7 changed files with 74 additions and 39 deletions.
2 changes: 2 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ export(add_theme)
export(exp_fig_accessible)
export(plot_landings)
export(plot_recruitment)
export(plot_recruitment_deviations)
export(plot_spawn_recruitment)
export(plot_spawning_biomass)
export(plot_total_biomass)
export(table_indices)
Expand Down
14 changes: 6 additions & 8 deletions R/plot_recruitment_deviations.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,16 @@
#'
#' @inheritParams plot_recruitment
#'
#' @returnPlot Plot recruitment deviations relative to one over time from an assessment model output file
#' translated to a standardized output. There are options to return a {ggplot2}
#' object or export an .rda object containing associated caption and alternative
#' text for the figure.
#' @return Plot recruitment deviations relative to one over time from an
#' assessment model output file translated to a standardized output. There are
#' options to return a {ggplot2} object or export an .rda object containing
#' associated caption and alternative text for the figure.
#' @export
#'
#' @examples
plot_recruitment_deviations <- function(
plot_recruitment_deviations <- function (
dat = NULL,
end_year = NULL,
n_projected_years = 10,

n_projected_years = 10
) {
if (is.null(end_year)) {
end_year <- max(as.numeric(dat$year), na.rm = TRUE) - n_projected_years
Expand Down
5 changes: 2 additions & 3 deletions R/plot_spawn_recruitment.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@
#' @param spawning_biomass_label Units for spawning biomass
#' @param recruitment_label units for recruitment
#'
#' @return
#' @return Plot spawning recruitment relationship from a standardized output file originating from asar::convert_output()
#' @export
#'
#' @examples
plot_spawn_recruitment <- function(
dat = NULL,
spawning_biomass_label = "metric tons",
Expand Down Expand Up @@ -62,5 +61,5 @@ plot_spawn_recruitment <- function(
ggplot2::labs(x = glue::glue("Spawning Biomass ({spawning_biomass_label})"),
y = glue::glue("Recruitment ({recruitment_label})")) +
ggplot2::theme(legend.position = "none")
# sr_plt <- add_theme(sr_plt)
suppressWarnings(add_theme(sr_plt))
}
42 changes: 15 additions & 27 deletions man/plot_recruitment.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions man/plot_recruitment_deviations.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions man/plot_spawn_recruitment.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion man/plot_spawning_biomass.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1f424ae

Please sign in to comment.