Plot Recruitment
plot_recruitment(
dat,
unit_label = "mt",
scale_amount = 1,
era = NULL,
group = NULL,
facet = NULL,
interactive = TRUE,
module = NULL,
make_rda = FALSE,
figures_dir = getwd(),
...
)Data frame or list. A tibble or named list of tibbles (input as `list()`) returned from convert_output.
If inputting a list of tibbles, the first tibble's reference point defined in `ref_line` is used to plot a reference line or calculate relative spawning biomass.
String. Units for recruitment
Default: "mt"
Number. A number to scale the y-axis values.
Default: 1
String. Era of data.
Default: "time"
Options: "early", "time", "fore" (forecast), or NULL (all data)
String. Single column that groups the data.
Set group = "none" to summarize data over all indexing values.
Default: NULL Options: Including, but not limited to: "year", "area", "fleet", "sex", "none", NULL
Character vector. Column name or names used for faceting.
Default: NULL
Logical. TRUE/FALSE; indicate whether the environment is interactive.
Default: `FALSE`
Character vector. (Optional) Module name found in `dat`. If selecting >1 module, place them in a vector like c("module1", "module2").
Default: NULL
If the interactive and >1 module_name is found, user will select the module_name in the console. @seealso [filter_data()]
Logical. TRUE/FALSE; indicate whether to save the object and make an automated caption and alternative text in the form of an `rda` object. If TRUE, the rda will be exported to the folder indicated in the argument "figures_dir".
Default: `FALSE`.
Path. Path to the "figures" folder.
Default: `getwd()`
The folder is created within the path if it does not exist.
Arguments called from geom_line or geom_point
A plot showing recruitment over time.
The input is from an assessment model output file translated to a standardized output (convert_output). There are options to return a `ggplot2` object or export an .rda object containing associated caption and alternative text for the figure.
[convert_output()], [filter_data()], [process_data()], [plot_timeseries()], [export_kqs()], [insert_kqs()], [create_rda()]
plot_recruitment(
dat = stockplotr:::example_data,
unit_label = "metric tons",
scale_amount = 100,
interactive = TRUE,
module = "TIME_SERIES",
make_rda = FALSE
)
#> Warning: Unknown or uninitialised column: `estimate`.
#> Warning: no non-missing arguments to min; returning Inf
#> Warning: Unknown or uninitialised column: `estimate`.
#> Warning: no non-missing arguments to max; returning -Inf
plot_recruitment(
dat = stockplotr:::example_data,
era = "fore",
module = "TIME_SERIES",
make_rda = FALSE
)
#> Warning: Unknown or uninitialised column: `estimate`.
#> Warning: no non-missing arguments to min; returning Inf
#> Warning: Unknown or uninitialised column: `estimate`.
#> Warning: no non-missing arguments to max; returning -Inf