Package: stockplotr 0.16.0.9000

Samantha Bredeck

stockplotr: Tables and Figures for Stock Assessments

Creates exploratory and finished tables and figures for stock assessment documents from U.S. stock assessment model outputs. This packages addresses parts of the stock assessment workflow that interprets outputs of stock assessment models as well as allows the analyst to create report ready tables and figures, reducing the need to create their own and format then when adding into a report. This package is intended to be used in conjuction with 'asar', a partially automated template for writing various stock assessment reports. Throughout development, we will be creating a set of standardized figures and tables for a stock assessment report, developing functions to produce a variety of diagonostic plots, and other helpful materials. The advantage of using this package over others is that it applies to a range of stock assessment model outputs and standardizes them.

Authors:Samantha Bredeck [aut, cre], Sophie Breitbart [aut, ctb], Steve Saul [aut], Kelli Johnson [ctb], Megumi Oshima [ctb]

stockplotr_0.16.0.9000.tar.gz
stockplotr_0.16.0.9000.zip(r-4.7-any)stockplotr_0.16.0.9000.zip(r-4.6-any)stockplotr_0.16.0.9000.zip(r-4.5-any)
stockplotr_0.16.0.9000.tgz(r-4.6-any)stockplotr_0.16.0.9000.tgz(r-4.5-any)
stockplotr_0.16.0.9000.tar.gz(r-4.7-any)stockplotr_0.16.0.9000.tar.gz(r-4.6-any)
stockplotr_0.16.0.9000.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION
card.svg |card.png
stockplotr/json (API)

# Install 'stockplotr' in R:
install.packages('stockplotr', repos = c('https://nmfs-opensci.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/nmfs-ost/stockplotr/issues

Datasets:

On CRAN:

Conda:

8.21 score 20 stars 1 packages 22 scripts 52 exports 65 dependencies

Last updated from:29865571c8. Checks:7 ERROR, 2 OK. Indexed: no.

TargetResultTimeFilesSyslog
linux-develERROR650
source / vignettesOK491
linux-releaseERROR838
macos-releaseERROR1014
macos-oldrelERROR1059
windows-develERROR943
windows-releaseERROR1047
windows-oldrelERROR1053
wasm-releaseOK370

Exports:add_caption_alt_textcalculate_reference_pointconvert_outputcreate_latex_tablecreate_rdaexport_rdaextract_caps_alttextextract_sis_datafilter_dataplot_aaplot_abundance_at_ageplot_biomassplot_biomass_at_ageplot_catch_at_ageplot_composition_andreplot_composition_bubbleplot_composition_distributionplot_composition_francisplot_composition_residual_distributionplot_composition_residual_patternplot_composition_residualsplot_composition_samplesplot_composition_sexratioplot_data_availabilityplot_discardplot_fishing_mortalityplot_indexplot_joint_residualsplot_landingsplot_natural_mortalityplot_obsvpredplot_recruitmentplot_recruitment_deviationsplot_retrospectiveplot_runs_testplot_selectivityplot_spawning_biomassplot_sprplot_stock_recruitmentplot_timeseriesprepare_composition_dataprocess_dataprocess_tablereference_linesave_all_plotstable_biomass_abundance_catchtable_indextable_landingstable_projectionstable_total_catchtheme_noaatheme_table

Dependencies:base64encbigDbitopsbslibcachemclicommonmarkcpp11curldata.tabledigestdplyrevaluatefarverfastmapfontawesomefsgenericsggplot2gluegtgtablehighrhtmltoolshtmlwidgetsisobandjquerylibjsonlitejuicyjuiceknitrlabelinglifecyclelitedownmagrittrmarkdownmemoisemimepillarpkgconfigpurrrR6rappdirsRColorBrewerRcppreactablereactRrlangrmarkdownS7sassscalesstringistringrtibbletidyrtidyselecttinytexutf8V8vctrsviridisLitewithrxfunxml2yaml

Composition data diagnostics
Composition data | Observations | Fits to the data | Pearson residuals | Sex ratios | Mean length and Francis weights | N-EffN comparison | Residual distribution and patterns | Conditional age-at-length data | Using model output | References

Last update: 2026-11-18
Started: 2026-11-18

Automating data extraction for SIS
Background | Workflow Overview | How to run extract_sis_data() | Familiarize yourself with the two templates | sis_assmt_template.csv | sis_ts_template.csv | Export at least one relevant figure/table as an .rda file | Provide the path to the key_quantities.csv file | Time series | Assessment data | Provide assessment data before or after running extract_sis_data() to populate additional fields | Provide additional time series data

Last update: 2026-11-16
Started: 2026-10-16

How captions and alternative text are generated
Templates | Calculating and exporting captions and alternative text | Connecting the tables & figures with the captions & alternative text | Expected outcomes | Single plot functions | Multi-plot functions

Last update: 2026-11-04
Started: 2025-03-18

Frequently Asked Questions (FAQs)
Captions and alternative text (alt text) | How are captions and alt text constructed? | How can I alter the captions and/or alt text? | If I recreate a figure or table, will its caption and/or alt text be updated/overwritten? | How can I change or update captions and alt text? | Individual figures/tables (e.g., plot_biomass()) | All available figures and tables (e.g., save_all_plots())

Last update: 2026-06-30
Started: 2026-05-08

Standardizing Assessment Model Output
Background | Set up and format | Naming Conventions | Final Formatting | Helpful Functions to Manipulate Data

Last update: 2026-05-18
Started: 2025-12-31

Readme and manuals

Help Manual

Help pageTopics
Add caption and alt text to the captions_alt_text.csv fileadd_caption_alt_text
Big Skate conditional age-at-length databigskate_caal
Big Skate length composition databigskate_lencomp
Calculate key quantitiescalc_kqs
Calculate reference value pointcalculate_reference_point
Create loop to test for differences in column valuescheck_label_differences
Code to convert BAM output to standard framework.conout_bam
Code to convert Rceattle output to standard framework.conout_rceattle
Code to convert SS3 output to standard framework.conout_ss3
Convert Outputconvert_output
Create the rda package for a plot or tablecreate_latex_table
Create the rda package for a plot or tablecreate_rda
SS3 Example dataexample_data
Export updated key quantities templateexport_kqs
Export a figure or table to rdaexport_rda
Extract captions and alternative textsextract_caps_alttext
Extract data from model results to send to SISextract_sis_data
Substitute key quantities' values into templatefill_in_kqs
Filter data for input into aesthetics for ggplot2filter_data
Filter plot data interactivelyfilter_interactive
Insert key quantities into the captions and alternative text fileinsert_kqs
Rename columns and merge estimate and uncertainty columns for table presentationmerge_error
Create "at-age" plotplot_aa
Plot Abundance at Ageplot_abundance_at_age
Plot Total Biomassplot_biomass
Plot Total Biomass at Age (BAA)plot_biomass_at_age
Plot catch-at-ageplot_catch_at_age
Plot Andre Punt's mean age at length for conditional age-at-length dataplot_composition_andre
Plot composition bubble plotsplot_composition_bubble
Plot composition distributionsplot_composition_distribution
Plot mean age or length with Francis (method 8 in Table A1, TA1.8) data weightsplot_composition_francis
Plot the distribution of composition residualsplot_composition_residual_distribution
Plot patterns in composition residuals by bin or yearplot_composition_residual_pattern
Plot composition Pearson residualsplot_composition_residuals
Plot input versus effective sample size of compositionsplot_composition_samples
Plot sex ratios implied by composition dataplot_composition_sexratio
Plot the data available to an assessment modelplot_data_availability
Plot observed and predicted discardsplot_discard
Create plot with errorplot_error
Plot fishing mortality timeseriesplot_fishing_mortality
Plot Index of Abundanceplot_index
Plot joint residuals of the fits to indices of abundanceplot_joint_residuals
Plot observed and predicted landingsplot_landings
Plot natural mortality (M) at ageplot_natural_mortality
Plot observed vs. predicted dataplot_obsvpred
Plot Recruitmentplot_recruitment
Plot recruitment deviationsplot_recruitment_deviations
Plot retrospective peelsplot_retrospective
Plot residual runs tests for indices of abundanceplot_runs_test
Plot selectivityplot_selectivity
Plot spawning biomass (SB)plot_spawning_biomass
Plot spawning potential ratio (SPR)plot_spr
Plot Stock Recruit Relationshipplot_stock_recruitment
Plot time series trendsplot_timeseries
2018 Gulf of Alaska Pollock stock assessment outputpollock
Prepare composition data for plottingprepare_composition_data
Processing for figuresprocess_data
Processing for tablesprocess_table
Preformatted reference linereference_line
Export all figures and tablessave_all_plots
SS3 Simple stock assessment outputss3_simple
Biomass, abundance, and catch time series tabletable_biomass_abundance_catch
Index of abundance tabletable_index
Landed catch by fleet and year tabletable_landings
Create Projection Summary Tabletable_projections
Catch (table) by fleet, gear type, sectortable_total_catch
Add NOAA theming to ggplot2 objecttheme_noaa
Add NOAA formatting to a tabletheme_table
SEDAR 55 South Atlantic Vermilion Snappervermilion_snapper