Skip to content

Commit

Permalink
fix: minor fixes to get plot_recruitment and plot_spawning_biomass to…
Browse files Browse the repository at this point in the history
… work; used devtools::check, which updated .Rd files
  • Loading branch information
sbreitbart-NOAA committed Nov 13, 2024
1 parent cae3e65 commit 8fd15da
Show file tree
Hide file tree
Showing 10 changed files with 48 additions and 12 deletions.
3 changes: 2 additions & 1 deletion R/plot_biomass.R
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,8 @@ plot_total_biomass <- function(dat,
export_rda(plt_fin = plt_fin,
caps_alttext = caps_alttext,
rda_folder = rda_folder,
topic_label = topic_label)
topic_label = topic_label,
fig_or_table = fig_or_table)

}

Expand Down
3 changes: 2 additions & 1 deletion R/plot_recruitment.R
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,8 @@ plot_recruitment <- function(dat,
export_rda(plt_fin = plt_fin,
caps_alttext = caps_alttext,
rda_folder = rda_folder,
topic_label = topic_label)
topic_label = topic_label,
fig_or_table = fig_or_table)

}

Expand Down
7 changes: 4 additions & 3 deletions R/plot_spawning_biomass.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ plot_spawning_biomass <- function(
ref_line = c("target", "unfished"),
end_year = NULL,
relative = FALSE,
export_rda = FALSE,
make_rda = FALSE,
rda_folder = getwd()
) {

Expand Down Expand Up @@ -145,12 +145,13 @@ plot_spawning_biomass <- function(
)

# export figure to rda if argument = T
if (export_rda == TRUE){
if (make_rda == TRUE){

export_rda(plt_fin = plt_fin,
caps_alttext = caps_alttext,
rda_folder = rda_folder,
topic_label = topic_label)
topic_label = topic_label,
fig_or_table = fig_or_table)
}

return(plt_fin)
Expand Down
3 changes: 2 additions & 1 deletion R/table_indices.R
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ table_indices <- function(dat,
export_rda(plt_fin = plt_fin,
caps_alttext = caps_alttext,
rda_folder = rda_folder,
topic_label = topic_label)
topic_label = topic_label,
fig_or_table = fig_or_table)

}

Expand Down
3 changes: 2 additions & 1 deletion R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ extract_caps_alttext <- function(topic_label,
export_rda <- function(plt_fin = plt_fin,
caps_alttext = caps_alttext,
rda_folder = rda_folder,
topic_label = topic_label){
topic_label = topic_label,
fig_or_table = fig_or_table){

# make rda for figures
if (fig_or_table == "figure") {
Expand Down
6 changes: 5 additions & 1 deletion man/plot_landings.Rd

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

13 changes: 12 additions & 1 deletion man/plot_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.

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

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

6 changes: 5 additions & 1 deletion man/table_indices.Rd

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

0 comments on commit 8fd15da

Please sign in to comment.