Package: framrsquared 0.8.1.9000

Ty Garber

framrsquared: FRAM Database Interface

A convenient tool for interfacing with FRAM access databases in R environments.

Authors:Ty Garber [cre, aut], Collin Edwards [aut]

framrsquared_0.8.1.9000.tar.gz
framrsquared_0.8.1.9000.zip(r-4.7)framrsquared_0.8.1.9000.zip(r-4.6)framrsquared_0.8.1.9000.zip(r-4.5)
framrsquared_0.8.1.9000.tgz(r-4.6-any)framrsquared_0.8.1.9000.tgz(r-4.5-any)
framrsquared_0.8.1.9000.tar.gz(r-4.7-any)framrsquared_0.8.1.9000.tar.gz(r-4.6-any)
framrsquared_0.8.1.9000.tgz(r-4.6-emscripten)
manual.pdf |manual.html
card.svg |card.png
framrsquared/json (API)
NEWS

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

Bug tracker:https://github.com/framverse/framrsquared/issues

Pkgdown/docs site:https://framverse.github.io

On CRAN:

Conda:

5.59 score 9 stars 12 scripts 92 exports 55 dependencies

Last updated from:728a067f43. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64OK152
source / vignettesOK196
linux-release-x86_64OK154
macos-release-arm64OK92
macos-oldrel-arm64OK91
windows-develOK94
windows-releaseOK89
windows-oldrelOK84
wasm-releaseOK165

Exports:add_total_mortalityaddstock_checkaeq_mortalitybkfram_checks_cohocalc_fram_scalingchange_run_idcoho_mark_ratescohort_abundancecompare_databasescompare_fishery_input_flagscompare_fishery_inputscompare_inputscompare_inputs_chartcompare_non_retention_input_flagscompare_non_retention_inputscompare_recruitscompare_runscompare_stock_fishery_rate_scalersconnect_fram_dbcopy_fishery_scalerscopy_runcopy_tammsdisconnect_all_fram_connectionsdisconnect_fram_dbfetch_quarto_templatesfetch_tablefetch_table_fetch_table_bkchinfilter_akfilter_bcfilter_cafilter_coastfilter_commercial_wa_ntfilter_flagfilter_marinefilter_netfilter_orfilter_puget_soundfilter_sportfilter_wafishery_mortalityfram_clean_tablesfram_database_speciesfram_database_typeget_fishery_idsget_run_idsget_stock_idsinitialize_projectlabel_fisherieslabel_fisheries_dblabel_flagslabel_stockslabel_stocks_dblist_extant_fram_connectionsmake_batch_runsmanagement_weekmodify_tablemortality_scalersmsf_encountersmsf_encounters_chinook_msf_encounters_coho_msf_landed_catchmsf_landed_catch_chinook_msf_landed_catch_coho_msf_mortalitiesmsf_mortalities_chinook_msf_mortalities_coho_msp_mortalityNR_flag_translateplot_impacts_per_catch_heatmapplot_stock_compplot_stock_mortalityplot_stock_mortality_time_steppopulation_statisticspost_season_abundanceprovide_table_namesremove_runrun_infoscalers_flag_translatesensitivity_customsensitivity_exactsensitivity_scaledstatistical_weekstock_fatestock_fate_chinookstock_fate_cohostock_mortalityterminal_fisheriesterminal_infoterminal_stockstruns_fisheriestruns_stocks

Dependencies:bitbit64blobcachemclicliprcpp11crayonDBIdplyrfarverfastmapframrosettagenericsggplot2gluegtableherehmsisobandjanitorlabelinglifecyclelubridatemagrittrmemoiseodbcpillarpkgconfigprettyunitsprogresspurrrR6RColorBrewerRcppreadrrenvrlangrprojrootRSQLiteS7scalessnakecasestringistringrtibbletidyrtidyselecttimechangetzdbutf8vctrsviridisLitevroomwithr

auditing_tools

Rendered fromauditing_tools.Rmdusingknitr::rmarkdownon May 09 2026.

Last update: 2025-01-02
Started: 2025-01-02

framrsquared

Rendered fromframrsquared.Rmdusingknitr::rmarkdownon May 09 2026.

Last update: 2025-08-08
Started: 2025-01-02

sensitivity_analyses

Rendered fromsensitivity_analyses.Rmdusingknitr::rmarkdownon May 09 2026.

Last update: 2025-10-23
Started: 2025-10-22

Readme and manuals

Help Manual

Help pageTopics
Sum separate mortality columns into new "total_mortality" columnadd_total_mortality
Check FRAM database after adding new stockaddstock_check
Extract AEQ mortality from Chinook FRAM database. Refactored and stripped down from the framr package written by Dan Auerbach. https://github.com/FRAMverse/framr/aeq_mortality
Performs error checks of a backwards FRAM run Returns nested tibble with diagnosticsbkfram_checks_coho
*[Experimental]* Calculate match/replace df based on scalingcalc_fram_scaling
Changes a run's ID number in a FRAM databasechange_run_id
Check if exported functions are documented in a filecheck_demo_coverage
*[Experimental]* Returns a tibble displaying predicted FRAMencounter mark rates by fishery, fishery type, and time-step.coho_mark_rates
*[Experimental]* Calculate starting cohort abundancecohort_abundance
*[Experimental]* Compare tables in two equivalent FRAM databasescompare_databases
Compares the fishery flags of two runscompare_fishery_input_flags
Compares the fishery inputs of two runscompare_fishery_inputs
Generates a dataframe that compares fishery scalers table for two runs identified by run_id'scompare_inputs
Generate heat map of changed values between two run inputs.compare_inputs_chart
Compares the non retention flags of two runscompare_non_retention_input_flags
Compares the non retention inputs of two runscompare_non_retention_inputs
Compares the recruit scalers of two runscompare_recruits
Generates a report to the console of changes to inputs between two runscompare_runs
Compares the stock fishery rate scalers of two runscompare_stock_fishery_rate_scalers
Connect to FRAM databaseconnect_fram_db
Experimental copying scaler inputs from one run to another DANGEROUScopy_fishery_scalers
*[Experimental]* Copies a run a number of timescopy_run
*[Experimental]* Copy TAMM for FRAM batch runscopy_tamms
Clear all connectionsdisconnect_all_fram_connections
Safely disconnect from FRAM databasedisconnect_fram_db
Creates quarto template filesfetch_quarto_templates
Fetch a complete table from a FRAM database.fetch_table fetch_table_
Safely fetch Chinook BackwardsFRAM tablefetch_table_bkchin
Filters a dataframe to Alaska fisheries. Will automatically detect whether it's working with a Chinook or Coho dataset if the tables were generated within this package. '.data' must have a 'fishery_id' column name.filter_ak
Filters a dataframe to Canadian (BC) fisheries. Will automatically detect whether it's working with a Chinook or Coho dataset if the tables were generated within this package. '.data' must have a 'fishery_id' column name.filter_bc
Filters a dataframe to California fisheries. Will automatically detect whether it's working with a Chinook or Coho dataset if the tables were generated within this package. '.data' must have a 'fishery_id' column name.filter_ca
Filters a dataframe to Coastal fisheries. Will automatically detect whether it's working with a Chinook or Coho dataset if the tables were generated within this package. '.data' must have a 'fishery_id' column name.filter_coast
Filters a dataframe to WA non-treaty commercial fisheries.filter_commercial_wa_nt
NA's all the information in the FisheryScalers that's not being used e.g Flag 1 only NS Scalers will be returnedfilter_flag
Filters a dataframe to marine fisheries. Will automatically detect whether it's working with a Chinook or Coho dataset if the tables were generated within this package. '.data' must have a 'fishery_id' column name.filter_marine
Filters a dataframe to net fisheries. Will automatically detect whether it's working with a Chinook or Coho dataset if the tables were generated within this package. '.data' must have a 'fishery_id' column name.filter_net
Filters a dataframe to Oregon fisheries. Will automatically detect whether it's working with a Chinook or Coho dataset if the tables were generated within this package. '.data' must have a 'fishery_id' column name.filter_or
Filters a dataframe to Puget Sound fisheries. Will automatically detect whether it's working with a Chinook or Coho dataset if the tables were generated within this package. '.data' must have a 'fishery_id' column name.filter_puget_sound
Filters a dataframe to sport fisheries. Will automatically detect whether it's working with a Chinook or Coho dataset if the tables were generated within this package. '.data' must have a 'fishery_id' column name.filter_sport
Filters a dataframe to Washington State fisheries. Will automatically detect whether it's working with a Chinook or Coho dataset if the tables were generated within this package. '.data' must have a 'fishery_id' column name.filter_wa
Finds tables that contain a specific column namefind_tables_by_column_
Returns a tibble matching the Fishery Mortality screen.fishery_mortality
Cleans the names of FRAM tables and coverts to a tibblefram_clean_tables
Identifies the FRAM database species focus - Chinook or Cohofram_database_species
Identifies the FRAM database type - Full or Transferfram_database_type
Gets all fishery_ids of FRAM databaseget_fishery_ids
Gets all run_ids of FRAM databaseget_run_ids
Gets all stock_id of FRAM databaseget_stock_ids
*[Experimental]* Initializes a FRAM projectinitialize_project
Generates an input summary based on a FisheryScalers dataframe. Probably end up streamlining / revising this.input_summary_
Label fisheries based on FRAM databaselabel_fisheries_db
Adds a column with a text version of flags for either non-retention or fishery scalerslabel_flags
Label stocks based on FRAM databaselabel_stocks_db
Describe existing fram connections (including orphans)list_extant_fram_connections
Make batch runsmake_batch_runs
Vectorized approach to calculating the management week, returns an integermanagement_week
*[Experimental]* Modify FRAM database based on match/replace dataframemodify_table
Quantify the proportion of fishery mortalities associated with stock(s) of interestmortality_scalers
Reproduce MSF encounters screenmsf_encounters
Replicate MSF screen report encounters for Chinookmsf_encounters_chinook_
Replicate MSF screen report encounters for COHOmsf_encounters_coho_
Reproduce MSF landed catch screenmsf_landed_catch
Replicate MSF screen report landed catch for Chinookmsf_landed_catch_chinook_
Replicate MSF screen report landed catch for COHOmsf_landed_catch_coho_
Reproduce MSF mortalities screenmsf_mortalities
Replicate MSF screen report mortalities for Chinookmsf_mortalities_chinook_
Replicate MSF screen report mortalities for COHOmsf_mortalities_coho_
Expand Chinook mortality table using Model-Stock Proportionmsp_mortality
Provides English translation of numeric non-retention flagsNR_flag_translate
Make plots to show the amount of landed catch_per_impactplot_impacts_per_catch_heatmap
Plot stock compositionplot_stock_comp
Plot total mortalities by fisheryplot_stock_mortality
Creates an ordered bar chart with the top number of mortalities per fishery and time step.plot_stock_mortality_time_step
Replicate Population Statistics screenpopulation_statistics
Generates post-season January age 3 abundances by stock from post-season databases. Used for forecasting.post_season_abundance
List names of FRAM tableprovide_table_names
Removes a run in a FRAM databaseremove_run
Provides a print out of Run ID informationrun_info
Provides English translation of numeric scalers flagsscalers_flag_translate
*[Experimental]* Generate sensitivity analyses runs based on a list of match/replace dataframessensitivity_custom
*[Experimental]* Generate sensitivity analyses runs based on exact valuessensitivity_exact
*[Experimental]* Generate sensitivity analyses runs scaled by template valuessensitivity_scaled
Vectorized approach to calculating the statistical week, returns an integerstatistical_week
Helper function to check that all stock x age combinations are presentstock_age_checker
Helper function to check that stock id make sensestock_check_helper
*[Experimental]* Summarizes the three true outcomes of a stocks abundance, where it dies to fishery related mortality, natural mortality, or reaches some sort of escapement. When run against the coho database spawning escapement will be displayed, when run against the Chinook database escapement to the river will be dislpayed along with recruits to the next year 'age_up'stock_fate
*[Experimental]* Chinook flavor of the stock fate functionstock_fate_chinook
*[Experimental]* Coho flavor of the stock fate functionstock_fate_coho
Helper function to check that stock id exist in the Stock databasestock_id_comp
Replicate Stock Mortality screenstock_mortality
Framrsquared style guidefrs_stylecheck_assignment frs_stylecheck_snakecase styleguide
*[Experimental]* List terminal stock informationterminal_fisheries
*[Experimental]* Parse TAAETRS tableterminal_info
*[Experimental]* List terminal stock informationterminal_stocks
Returns a dataframe with fisheries defined by the TRuns report drivertruns_fisheries
Returns a dataframe with stocks defined by the TRuns report drivertruns_stocks
Convenience function to check fishery inputvalidate_fishery_ids
Convenience function to check fram_db inputvalidate_fram_db
Convenience function to check run_id inputvalidate_run_id
Convenience function to check fishery inputvalidate_stock_ids
Welcome message, summarizing database informationwelcome