diff --git a/R/plot_abundance_at_age.R b/R/plot_abundance_at_age.R index 91714d58..cfad7f53 100644 --- a/R/plot_abundance_at_age.R +++ b/R/plot_abundance_at_age.R @@ -1,27 +1,39 @@ -#' Plot Abundance (or Numbers) at Age (AAA or NAA) +#' Plot Abundance at Age #' #' @param dat A data frame returned from \link[stockplotr]{convert_output} #' @param facet a string or vector of strings of column(s) that #' groups the data (e.g. "fleet", "sex", "area", etc.). Set facet = "none" to #' summarize the data in a single plot. +#' +#' Default: NULL (function will automatically detect and indexing in the data +#' and place them into group then facet) #' @param unit_label units for abundance +#' +#' Default: "fish" #' @param scale_amount A number describing how much to scale down the abundance at #' age. Please choose a value ranging from 1-1,000,000,000 (one billion) in orders #' of magnitude (e.g., 1, 10, 100, 1000, etc.). For example, scale_amount = 100 #' would scale down a value from 500,000 --> 5,000 and would report abundance in #' hundreds of fish (if "fish" was the unit_label). This scale will be reflected -#' in the legend label if proportional is set to FALSE. The default is 1,000. -#' @param proportional Set size of points relative to z when TRUE, point -#' size are relative to one another while when set to FALSE, point size -#' is relative to z +#' in the legend label if proportional is set to FALSE. +#' +#' Default: 1,000. +#' @param proportional Set size of points relative to abundance. When TRUE, point +#' size are relative to one another. When set to FALSE, point size +#' is relative to abundance. +#' +#' Default: TRUE #' @param make_rda TRUE/FALSE; indicate whether to produce an .rda file containing #' a list with the figure/table, caption, and alternative text (if figure). If TRUE, -#' the .rda will be exported to the folder indicated in the argument "rda_dir". -#' Default is FALSE. +#' the .rda will be exported to the folder indicated in the argument "figures_dir". +#' +#' Default: FALSE #' @param figures_dir The location of the folder containing the generated .rda files #' ("rda_files") that will be created if the argument `make_rda` = TRUE. #' Default is the working directory. -#' @returns A plot showing total abundance (or numbers) at age. +#' +#' Default: getwd() +#' @returns Plot of total abundance at age. #' #' @details The input is from an assessment model output file #' translated to a standardized output (\link[stockplotr]{convert_output}). @@ -38,9 +50,7 @@ #' facet = "growth_pattern", #' unit_label = "fish", #' scale_amount = 1000, -#' proportional = TRUE, -#' make_rda = FALSE, -#' figures_dir = getwd() +#' proportional = TRUE #' ) #' plot_abundance_at_age( #' dat = stockplotr:::example_data, diff --git a/man/plot_abundance_at_age.Rd b/man/plot_abundance_at_age.Rd index f28641c0..9f8b339d 100644 --- a/man/plot_abundance_at_age.Rd +++ b/man/plot_abundance_at_age.Rd @@ -2,7 +2,7 @@ % Please edit documentation in R/plot_abundance_at_age.R \name{plot_abundance_at_age} \alias{plot_abundance_at_age} -\title{Plot Abundance (or Numbers) at Age (AAA or NAA)} +\title{Plot Abundance at Age} \usage{ plot_abundance_at_age( dat, @@ -19,35 +19,47 @@ plot_abundance_at_age( \item{facet}{a string or vector of strings of column(s) that groups the data (e.g. "fleet", "sex", "area", etc.). Set facet = "none" to -summarize the data in a single plot.} +summarize the data in a single plot. -\item{unit_label}{units for abundance} +Default: NULL (function will automatically detect and indexing in the data +and place them into group then facet)} + +\item{unit_label}{units for abundance + +Default: "fish"} \item{scale_amount}{A number describing how much to scale down the abundance at age. Please choose a value ranging from 1-1,000,000,000 (one billion) in orders of magnitude (e.g., 1, 10, 100, 1000, etc.). For example, scale_amount = 100 would scale down a value from 500,000 --> 5,000 and would report abundance in hundreds of fish (if "fish" was the unit_label). This scale will be reflected -in the legend label if proportional is set to FALSE. The default is 1,000.} +in the legend label if proportional is set to FALSE. + +Default: 1,000.} -\item{proportional}{Set size of points relative to z when TRUE, point -size are relative to one another while when set to FALSE, point size -is relative to z} +\item{proportional}{Set size of points relative to abundance. When TRUE, point +size are relative to one another. When set to FALSE, point size +is relative to abundance. + +Default: TRUE} \item{make_rda}{TRUE/FALSE; indicate whether to produce an .rda file containing a list with the figure/table, caption, and alternative text (if figure). If TRUE, -the .rda will be exported to the folder indicated in the argument "rda_dir". -Default is FALSE.} +the .rda will be exported to the folder indicated in the argument "figures_dir". + +Default: FALSE} \item{figures_dir}{The location of the folder containing the generated .rda files ("rda_files") that will be created if the argument `make_rda` = TRUE. -Default is the working directory.} +Default is the working directory. + +Default: getwd()} } \value{ -A plot showing total abundance (or numbers) at age. +Plot of total abundance at age. } \description{ -Plot Abundance (or Numbers) at Age (AAA or NAA) +Plot Abundance at Age } \details{ The input is from an assessment model output file @@ -61,9 +73,7 @@ plot_abundance_at_age( facet = "growth_pattern", unit_label = "fish", scale_amount = 1000, - proportional = TRUE, - make_rda = FALSE, - figures_dir = getwd() + proportional = TRUE ) plot_abundance_at_age( dat = stockplotr:::example_data, diff --git a/man/plot_biomass_at_age.Rd b/man/plot_biomass_at_age.Rd index cd8fe3b1..532cbf74 100644 --- a/man/plot_biomass_at_age.Rd +++ b/man/plot_biomass_at_age.Rd @@ -20,18 +20,25 @@ plot_biomass_at_age( \item{facet}{a string or vector of strings of column(s) that groups the data (e.g. "fleet", "sex", "area", etc.). Set facet = "none" to -summarize the data in a single plot.} +summarize the data in a single plot. -\item{unit_label}{units for abundance} +Default: NULL (function will automatically detect and indexing in the data +and place them into group then facet)} + +\item{unit_label}{units for abundance + +Default: "fish"} \item{scale_amount}{A number describing how much to scale down the biomass at age. For example, scale_amount = 100 would scale down a value from 500,000 --> 5,000. This scale will be reflected in the legend label if proportion is set to FALSE.} -\item{proportional}{Set size of points relative to z when TRUE, point -size are relative to one another while when set to FALSE, point size -is relative to z} +\item{proportional}{Set size of points relative to abundance. When TRUE, point +size are relative to one another. When set to FALSE, point size +is relative to abundance. + +Default: TRUE} \item{interactive}{TRUE/FALSE; indicate whether the environment in which the function is operating is interactive. This bypasses some options for @@ -39,12 +46,15 @@ filtering when preparing data for the plot. Default is FALSE.} \item{make_rda}{TRUE/FALSE; indicate whether to produce an .rda file containing a list with the figure/table, caption, and alternative text (if figure). If TRUE, -the .rda will be exported to the folder indicated in the argument "rda_dir". -Default is FALSE.} +the .rda will be exported to the folder indicated in the argument "figures_dir". + +Default: FALSE} \item{figures_dir}{The location of the folder containing the generated .rda files ("rda_files") that will be created if the argument `make_rda` = TRUE. -Default is the working directory.} +Default is the working directory. + +Default: getwd()} } \value{ A plot showing total biomass at age. diff --git a/man/plot_catch_comp.Rd b/man/plot_catch_comp.Rd index 800cdc2d..5aeee6fb 100644 --- a/man/plot_catch_comp.Rd +++ b/man/plot_catch_comp.Rd @@ -22,7 +22,10 @@ plot_catch_comp( \item{facet}{a string or vector of strings of column(s) that groups the data (e.g. "fleet", "sex", "area", etc.). Set facet = "none" to -summarize the data in a single plot.} +summarize the data in a single plot. + +Default: NULL (function will automatically detect and indexing in the data +and place them into group then facet)} \item{era}{a string naming the era of data such as historical ("early"), current ("time"), or projected ("fore") data if filtering should occur. Default is set to "time" which is @@ -37,9 +40,11 @@ would scale down a value from 500,000 --> 5,000 and would report catch in hundreds of the 'unit_label'. This scale will be reflected in the legend label if proportional is set to FALSE. The default is 1.} -\item{proportional}{Set size of points relative to z when TRUE, point -size are relative to one another while when set to FALSE, point size -is relative to z} +\item{proportional}{Set size of points relative to abundance. When TRUE, point +size are relative to one another. When set to FALSE, point size +is relative to abundance. + +Default: TRUE} \item{interactive}{TRUE/FALSE; indicate whether the environment in which the function is operating is interactive. This bypasses some options for @@ -51,12 +56,15 @@ will select the most relevant module if more than 1 exists.} \item{make_rda}{TRUE/FALSE; indicate whether to produce an .rda file containing a list with the figure/table, caption, and alternative text (if figure). If TRUE, -the .rda will be exported to the folder indicated in the argument "rda_dir". -Default is FALSE.} +the .rda will be exported to the folder indicated in the argument "figures_dir". + +Default: FALSE} \item{figures_dir}{The location of the folder containing the generated .rda files ("rda_files") that will be created if the argument `make_rda` = TRUE. -Default is the working directory.} +Default is the working directory. + +Default: getwd()} } \value{ A plot showing catch or landings composition.