Title: | Streamline working with Terminal Area Management Modules |
---|---|
Description: | A convenient tool for interfacing with Terminal Area Manamagement Modules (TAMMs) in R environments. |
Authors: | Collin Edwards [aut, cre] , Ty Garber [aut] |
Maintainer: | Collin Edwards <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.1.0 |
Built: | 2024-11-14 23:28:08 UTC |
Source: | https://github.com/cbedwards-dfw/TAMMsupport |
Format chunks of dataframe to present as %s, round digits
chunk_formater_percenter(df, block.ranges, percent.digits = 1)
chunk_formater_percenter(df, block.ranges, percent.digits = 1)
df |
dataframe of sheet to apply formatting to. |
block.ranges |
vector of characters specifying blocks of cells (in excel nomenclature) to format as %s |
percent.digits |
Decimal place to round to in percent |
Formatted version of df
Format chunks of dataframe to round digits
chunk_formater_rounder(df, block.ranges, digits = 1)
chunk_formater_rounder(df, block.ranges, digits = 1)
df |
dataframe of sheet to apply formatting to. |
block.ranges |
vector of characters specifying blocks of cells (in excel nomenclature) to format as %s |
digits |
Decimal place to round to. |
Formatted version of df
Effectively a wrapper function for read_limiting_stock with some formatting added in. Filters to unmarked naturals, just present ER values.
clean_limiting_stock(filename)
clean_limiting_stock(filename)
filename |
Name (and path) for TAMM files |
dataframe
Adapted from framrsquared::filter_wa(), but (a) only for Chinook (at present), and (b) uses TAMM fishery ids, so includes
ids 72 and 73. Includes code for COHO based on FRAM ids. filter_tamm_wa()
uses attributes to specify chinook or coho. To
directly filter for chinook or coho, use filter_tamm_wa_chin()
or filter_tamm_wa_coho()
.
filter_tamm_wa(.data) filter_tamm_wa_chin(.data) filter_tamm_wa_coho(.data)
filter_tamm_wa(.data) filter_tamm_wa_chin(.data) filter_tamm_wa_coho(.data)
.data |
Dataframe generated within this package |
a fishery_id
column name.
## Not run: fram_dataframe |> filter_wa() ## End(Not run)
## Not run: fram_dataframe |> filter_wa() ## End(Not run)
Designed for tracking the status of TAMM inputs, which are typically color coded.
Searches through specified sheet or sheets, looking for cells whose colors match the
target_cell
argument. Returns a condensed list of those entries.
find_color_matches(file, target_cell, sheets = "Input Page")
find_color_matches(file, target_cell, sheets = "Input Page")
file |
Character string of excel file name, including path if relevant |
target_cell |
Character string of excel address of cell with the cell shading of interest (e.g., "B4") |
sheets |
character string or character vector of sheets to search through |
tibble summarizing entries with the color of interest, including sheet, row and column ids, and row name (entry of first column in sheet)
## Not run: file = "chin tamms/Chin2023_Final.xlsx" find_color_matches(file, "B20") ## End(Not run)
## Not run: file = "chin tamms/Chin2023_Final.xlsx" find_color_matches(file, "B20") ## End(Not run)
Mapping of fishery_id to fishery name for Chinook salmon, taken from the Fishery
table of
the Chinook FRAM database.
fishery_chinook_fram
fishery_chinook_fram
A data frame with 74 rows and 5 columns:
Species name
Chinook fishery id number in FRAM
Chinook fishery name in FRAM
consistent and more human readable version of fishery_name
2024 Pre-Season Chinook DB.mdb
Mapping of fishery_id to fishery name for Coho salmon, taken from the Fishery
table of
the Coho FRAM database.
fishery_coho_fram
fishery_coho_fram
A data frame with 198 rows and 5 columns:
Species name
Coho fishery id number in FRAM
Coho fishery name in FRAM
consistent and more human readable version of fishery_name
2024NOF_CohoFRAMdatabase_distribution.mdb
With argument sep = TRUE
, will return data frame with separate
columns for the area and the the "class" (Net, Troll, Sport)
fishery_renamer(x, sep = FALSE)
fishery_renamer(x, sep = FALSE)
x |
character vector of fishery names from TAMM or FRAM |
sep |
Should we return a dataframe with separate column for class of fishing? Defaults to FALSE |
#vector with cleaned fishery names OR dataframe with cleaned name ($full
),
area without fishery type ($area
) and type of fishery ($class
).
Modify list of Chinook TAMM spreadsheet dataframes to facilitate comparison.
format_key_tamm_sheets_chin( dat, percent.digits = 1, numeric.digits = 1, numeric.digits.small = 4 )
format_key_tamm_sheets_chin( dat, percent.digits = 1, numeric.digits = 1, numeric.digits.small = 4 )
dat |
list of dataframes corresponding to the overview, limiting stock, and inputs tabs. Must be named |
percent.digits |
Optional, number of decimal places to round percentages to before comparison. Defaults to 1. |
numeric.digits |
Optional, number of decimal places to round non-percentage numerics to before comparison. Applied to numbers that are expected to have natural units of whole numbers (e.g. numbers of fish). Defaults to 1. |
numeric.digits.small |
Optional, number of decimal places to round non-percentage numerics to before comparison. Applied to numbers that are expected to be small (e.g. rates, proportions) Defaults to 4. |
list of dataframes with same structure as dat
, contents modified.
Modify list of Coho TAMM spreadsheet dataframes to facilitate comparison.
format_key_tamm_sheets_coho( dat, percent.digits = 2, numeric.digits = 1, numeric.digits.small = 4 )
format_key_tamm_sheets_coho( dat, percent.digits = 2, numeric.digits = 1, numeric.digits.small = 4 )
dat |
list of dataframes corresponding to the overview, limiting stock, and inputs tabs. Must be named |
percent.digits |
Optional, number of decimal places to round percentages to before comparison. Defaults to 1. |
numeric.digits |
Optional, number of decimal places to round non-percentage numerics to before comparison. Applied to numbers that are expected to have natural units of whole numbers (e.g. numbers of fish). Defaults to 1. |
numeric.digits.small |
Optional, number of decimal places to round non-percentage numerics to before comparison. Applied to numbers that are expected to be small (e.g. rates, proportions) Defaults to 4. |
list of dataframes with same structure as dat
, contents modified.
Format TAMM overview for easy printing
format_overview(dat.overview)
format_overview(dat.overview)
dat.overview |
dataframe of TAMM overview page, as produced by read_overview() |
list with the formatted data, a vector of indent information, and a vector of bolding information.
Intended for internal use within formatting functions. Note that percents in excel are read in as proportions in R – this makes them percents to make saved files more readable.
fun_percenter(x, percent.digits)
fun_percenter(x, percent.digits)
x |
Character vector, presumably containing some entries that are numbers in character form |
percent.digits |
Number of digits to round to after converting to percents |
character vector with individual entries converted to percentages and rounded as appropriate.
Intended for internal use within formatting functions.
fun_rounder(x, digits)
fun_rounder(x, digits)
x |
Character vector, presumably containing some entries that are numbers in character form |
digits |
Number of digits to round numeric items to |
Uses output of format_overview()
kable_overview(dat.overview, ind.indent, col.bold)
kable_overview(dat.overview, ind.indent, col.bold)
dat.overview |
formatted data, first item of format_overview() output |
ind.indent |
Vector of indices that need indenting to match TAMM overview formatting. Second item of format_overview() output |
col.bold |
vector of names for bolding to match TAMM overview formatting. Third item of format_overview() output. |
html table
Quick helper function to format vectors that contain text and ERs
quick_er_format(x)
quick_er_format(x)
x |
character vector |
Read Chinook TAMM files to extract the key sheets
read_key_tamm_sheets_chin(xlsxFile)
read_key_tamm_sheets_chin(xlsxFile)
xlsxFile |
#Tamm file name |
List of dataframes: $overview
, $limiting
, and $input
Read Chinook TAMM files to extract the key sheets
read_key_tamm_sheets_coho(xlsxFile)
read_key_tamm_sheets_coho(xlsxFile)
xlsxFile |
#Tamm file name |
List of dataframes: $two
, $tami
, and $wacoast
Reads in the table, adds fishery type information.
read_limiting_stock(filename, longform = FALSE)
read_limiting_stock(filename, longform = FALSE)
filename |
Tamm name (and path) |
longform |
Should results be in long form (good for R stuff) ( |
data frame summarizing the TAMM limiting stock tab.
Extract and format management criterion from Chinook TAMM
read_management_chin(file)
read_management_chin(file)
file |
filename, including filepath if appropriate |
Tibble, with $management_name
giving the name of the management criteria as specified in
the TAMM, $management_criteria
giving a list of dataframes with the associated management criteria, formatted appropriately, and
$notes
giving a list of character vectors with notes (if any) to help interpret the criteria.
## Not run: cur.management = read_management_chin("Code Inputs/Pre-Season/TAMMs/2013_Final W_BP7.1.xlsx") ## End(Not run)
## Not run: cur.management = read_management_chin("Code Inputs/Pre-Season/TAMMs/2013_Final W_BP7.1.xlsx") ## End(Not run)
Read overview sheet from TAMM and return key stock
read_overview(path)
read_overview(path)
path |
filename (including path) to Chinook TAMM |
dataframe
The stock column of the overview tab uses R-unfriendly approaches to store
season, overall stock name, and individual stocks in the stock
column of the TAMM. read_overview_complete
splits these into separate columns: season
, primary_stock
, and stock
.
For three stock (Green, Puyallup, Skokomish), the tamm presents model predictions across two rows with
a single stock name due to merged cells. The stock
column in the output preserves this information;
the entry corresponding to the second row has the suffix "_row2".
read_overview_complete(path)
read_overview_complete(path)
path |
filename (including path) to Chinook TAMM |
Dataframe containing all infomration from cells A2:H34 of the "ER_ESC_Overview_New" sheet.
Extract Treaty and Nontreaty numbers from "2A_CU&M_H+N" TAMM sheet. For Elwha and Dungeoness, separate allocations are calculated using column O of the JDF tab
read_tnt_allocation_chin(xlsxFile)
read_tnt_allocation_chin(xlsxFile)
xlsxFile |
Character vector. Filename (including path) for chinook TAMM |
Currently provides dataframe with stock.original
column identifying the stock based on their names
in the TAMM, and stock.clean
with more human-readable names (which are generally consistent
with other stock names, like those used to label the management criterion).
dataframe with the treaty and nontreaty mortalities at each stock.
Internal tool to simplify converting TAMM sheet to stock management criterion lists. See
read_management_chin()
for example use.
reformat_management( df, cols.percent, rows.percent = NULL, rows.header = 2, notes = NULL )
reformat_management( df, cols.percent, rows.percent = NULL, rows.header = 2, notes = NULL )
df |
dataframe trimmed from TAMM management page to just the relevant stock's criterion. |
cols.percent |
Column numbers for columns that should be converted to percents. |
rows.percent |
Character vector of row sub-stock names identifying rows (if any) that should be translated to percents. Defaults to NULL. Developed to accomodate "CERC (SUS)" in Snohomish. |
rows.header |
How many rows are used to make up the header? Defaults to 2, but sometimes header block in TAMM is 1 row. |
notes |
Optional. Character vector, each item of which is a separate note associated with this stock. Generally based on comments in excel doc, can also feed in "extra" rows from TAMM that contain caveats. |
Stock management criterion list, containing dataframe extracted from TAMM and notes hard-coded in based on TAMM cell comments.
Mapping of stock_id to stock name for Chinook salmon, taken from the Stock
table of
the Chinook FRAM database.
stock_chinook_fram
stock_chinook_fram
A data frame with 78 rows and 7 columns:
Species name
Chinook stock id number in FRAM
Chinook stock name in FRAM
stock_name
but more human readable
2024 Pre-Season Chinook DB.mdb
Mapping of stock_id to stock name for Coho salmon, taken from the Stock
table of
the Coho FRAM database.
stock_coho_fram
stock_coho_fram
A data frame with 78 rows and 7 columns:
Species name
Coho stock id number in FRAM
Coho stock name in FRAM
stock_name
but more human readable
2024NOF_CohoFRAMdatabase_distribution.mdb
Intended use case is to compare low, mid, and high ocean option.
tamm_compare( tamm.names, tamm.path = getwd(), fisheries = NULL, clean = TRUE, overwrite = TRUE )
tamm_compare( tamm.names, tamm.path = getwd(), fisheries = NULL, clean = TRUE, overwrite = TRUE )
tamm.names |
character vector of the three tamm files to compare (including .xlsx suffix). |
tamm.path |
Absolute path to directory containing the tamm file. |
fisheries |
Optional, numeric vector of fishery IDs to filter to before plotting fishery-specific ER for each stock. Defaults to NULL (no filtering). |
clean |
Should the intermediate .qmd files used to make the report be deleted afterwards? Logical, defaults to |
overwrite |
Should the intermediate .qmd files or the final report be overwritten if those files already exist?; Logical, defaults to |
Nothing
## Not run: tamm.path <- "C:/Users/edwc1477/Documents/WDFW FRAM team work/NOF material/NOF 2024/FRAM" tamm.names <- c("Chin1024.xlsx", "Chin1124.xlsx", "Chin1224.xlsx") tamm_compare3(tamm.names = tamm.names, tamm.path = tamm.path) ## End(Not run)
## Not run: tamm.path <- "C:/Users/edwc1477/Documents/WDFW FRAM team work/NOF material/NOF 2024/FRAM" tamm.names <- c("Chin1024.xlsx", "Chin1124.xlsx", "Chin1224.xlsx") tamm_compare3(tamm.names = tamm.names, tamm.path = tamm.path) ## End(Not run)
Intended use case is to compare low, mid, and high ocean option.
tamm_compare3(tamm.names, tamm.path = getwd(), clean = TRUE, overwrite = TRUE)
tamm_compare3(tamm.names, tamm.path = getwd(), clean = TRUE, overwrite = TRUE)
tamm.names |
character vector of the three tamm files to compare (including .xlsx suffix). |
tamm.path |
Absolute path to directory containing the tamm file. |
clean |
Should the intermediate .qmd files used to make the report be deleted afterwards? Logical, defaults to |
overwrite |
Should the intermediate .qmd files or the final report be overwritten if those files already exist?; Logical, defaults to |
Nothing
## Not run: tamm.path <- "C:/Users/edwc1477/Documents/WDFW FRAM team work/NOF material/NOF 2024/FRAM" tamm.names <- c("Chin1024.xlsx", "Chin1124.xlsx", "Chin1224.xlsx") tamm_compare3(tamm.names = tamm.names, tamm.path = tamm.path) ## End(Not run)
## Not run: tamm.path <- "C:/Users/edwc1477/Documents/WDFW FRAM team work/NOF material/NOF 2024/FRAM" tamm.names <- c("Chin1024.xlsx", "Chin1124.xlsx", "Chin1224.xlsx") tamm_compare3(tamm.names = tamm.names, tamm.path = tamm.path) ## End(Not run)
Compare key sheets of TAMM files
tamm_diff( filename.1, filename.2, results.name, percent.digits = 1, numeric.digits = 1, numeric.digits.small = 4, dim.override = FALSE, wrap.text = FALSE )
tamm_diff( filename.1, filename.2, results.name, percent.digits = 1, numeric.digits = 1, numeric.digits.small = 4, dim.override = FALSE, wrap.text = FALSE )
filename.1 |
name of first TAMM file to compare. Include file path if file is not in working directory. |
filename.2 |
name of second TAMM file to compare. Include file path if file is not in working directory. |
results.name |
name of output sheets. Include file path if save location is not in working directory. |
percent.digits |
Number of decimals to round percentages to before comparing. Defaults to 1. |
numeric.digits |
Number of decimals to round numbers to before comparing. Applied to cells which expect to be whole numbers (e.g. #s of fish). Defaults to 1. |
numeric.digits.small |
Number of decimals to round numbers to before comparing. Applied to cells which expect to be small decimals. Defaults to 4. |
dim.override |
Should we force comparisons even if one or more of the sheets don't have matching dimensions between the two files? Defaults to FALSE. |
wrap.text |
Should specific cells with long contents (e.g., input "Fishery Description" cells) use text wrapping? Defaults to FALSE |
If TAMM formatting is changes (e.g. the addition of rows, etc), make changes in the following areas:
read_key_tamm_sheets_SPECIES()
: The range
argument in each read_excel
call should change to match the new dimensions of each sheet.
format_key_tamm_sheets_SPECIES()
: These functions designate groups of cells to be
Depending on the sheets that change, any amount of the content here may need to change. In the case of
the inputs tab section, the cell ranges can be reported directly. Remember that we are separately designating cells which should be rounded to the nearest
numeric.digits
(generally measures of fish) and those that should be rounded to the nearest numeric.digits.small
(generall proportions and rates; typically
values that are less than 1.). Note that the earlier code was written before the more flexible chunk_formater_percenter
and chunk_formater_rounder
had been developed.
If rewriting, lean into those tools, as they will streamline designating regions of cells for the various rounding criterion.
tamm_format_SHEETNAME()
(for the sheet formatting functions relevant to that species): each individual
sheet has custom formatting to generally match the corresponding TAMM sheets. If the locations of cells move,
the changes to font size, addition of borders, etc, will also need to move. Note that tamm_format_limiting
and tamm_format_overview
were written
before the development of the more flexible add_cell_borders
, or the combined use of purrr::map
and cell_range_translate
. Look to tamm_format_input
for relatively inputting of formatting. Consider developing other helper functions as needed (esp for merging).
## Not run: tamm_diff( filename.1 = here("FRAM/Chin1124.xlsx"), filename.2 = here("NOF 2/Chin2524.xlsx"), results.name = here("Chin 1124 vs Chin 2524.xlsx") ) ## End(Not run)
## Not run: tamm_diff( filename.1 = here("FRAM/Chin1124.xlsx"), filename.2 = here("NOF 2/Chin2524.xlsx"), results.name = here("Chin 1124 vs Chin 2524.xlsx") ) ## End(Not run)
Compare key sheets of Chinook TAMM files
tamm_diff_chin( filename.1, filename.2, results.name, percent.digits = 1, numeric.digits = 1, numeric.digits.small = 4, dim.override = FALSE, wrap.text = FALSE )
tamm_diff_chin( filename.1, filename.2, results.name, percent.digits = 1, numeric.digits = 1, numeric.digits.small = 4, dim.override = FALSE, wrap.text = FALSE )
filename.1 |
name of first TAMM file to compare. Include file path if file is not in working directory. |
filename.2 |
name of second TAMM file to compare. Include file path if file is not in working directory. |
results.name |
name of output sheets. Include file path if save location is not in working directory. |
percent.digits |
Number of decimals to round percentages to before comparing. Defaults to 1. |
numeric.digits |
Number of decimals to round numbers to before comparing. Applied to cells which expect to be whole numbers (e.g. #s of fish). Defaults to 1. |
numeric.digits.small |
Number of decimals to round numbers to before comparing. Applied to cells which expect to be small decimals. Defaults to 4. |
dim.override |
Should we force comparisons even if one or more of the sheets don't have matching dimensions between the two files? Defaults to FALSE. |
wrap.text |
Should specific cells with long contents (e.g., input "Fishery Description" cells) use text wrapping? Defaults to FALSE |
Compare key sheets of Coho TAMM files
tamm_diff_coho( filename.1, filename.2, results.name, percent.digits = 2, numeric.digits = 1, numeric.digits.small = 4, dim.override = FALSE, wrap.text = FALSE )
tamm_diff_coho( filename.1, filename.2, results.name, percent.digits = 2, numeric.digits = 1, numeric.digits.small = 4, dim.override = FALSE, wrap.text = FALSE )
filename.1 |
name of first TAMM file to compare. Include file path if file is not in working directory. |
filename.2 |
name of second TAMM file to compare. Include file path if file is not in working directory. |
results.name |
name of output sheets. Include file path if save location is not in working directory. |
percent.digits |
Number of decimals to round percentages to before comparing. Defaults to 1. |
numeric.digits |
Number of decimals to round numbers to before comparing. Applied to cells which expect to be whole numbers (e.g. #s of fish). Defaults to 1. |
numeric.digits.small |
Number of decimals to round numbers to before comparing. Applied to cells which expect to be small decimals. Defaults to 4. |
dim.override |
Should we force comparisons even if one or more of the sheets don't have matching dimensions between the two files? Defaults to FALSE. |
wrap.text |
Should specific cells with long contents (e.g., input "Fishery Description" cells) use text wrapping? Defaults to FALSE |
Functions that add formatting to broadly replicate the formatting of the TAMM sheets. Colored foregrounds have been toned down to help change highlighting pop, and some of the complicated or superfluous formatting has been skipped.
tamm_format_overview(wb, diff.sheet, tabname = "overview") tamm_format_limiting(wb, tabname = "limiting") tamm_format_input(wb, tabname = "input", wrap.text = FALSE) tamm_format_wacoast(wb, tabname = "wacoast")
tamm_format_overview(wb, diff.sheet, tabname = "overview") tamm_format_limiting(wb, tabname = "limiting") tamm_format_input(wb, tabname = "input", wrap.text = FALSE) tamm_format_wacoast(wb, tabname = "wacoast")
wb |
|
diff.sheet |
For |
tabname |
Name of sheet in the wb to be modified. Defaults to correct value. |
wrap.text |
Should specific cells with long content use text wrapping? Defaults to FALSE. |
Generate report of figures from TAMM file
tamm_report( tamm.name, tamm.path = getwd(), clean = TRUE, overwrite = TRUE, additional.children = NULL, additional.support.files = NULL )
tamm_report( tamm.name, tamm.path = getwd(), clean = TRUE, overwrite = TRUE, additional.children = NULL, additional.support.files = NULL )
tamm.name |
Name of tamm file (including .xlsx suffix). Character atomic |
tamm.path |
Absolute path to directory containing the tamm file. |
clean |
Should the intermediate .qmd files used to make the report be deleted afterwards? Logical, defaults to |
overwrite |
Should the intermediate .qmd files or the final report be overwritten if those files already exist?; Logical, defaults to |
additional.children |
Optional argument with filepath(s) to additional quarto child documents (see |
additional.support.files |
Optional argument with filepath(s) to additional files needed by additional quarto documents. Files will be copied into the same directory as the TAMM for
easy reading/use by |
This function generates a summary report of a single chinook TAMM (Terminal Area Management Module) file. The common use case is to call this function for a tamm, and then view the resulting html report (which will be generated in the same folder as the TAMM). However, this function also provides substantial flexibility in the form of optional user-created child quarto documents, which requires some additional context to develop and use.
tamm_report
is implemented using a parameterized quarto report and a child quarto document, which are included in the package.
The resulting report includes some broadly useful content – currently, a replication of the overview TAMM sheet and
bar charts showing the breakdown of exploitation rates by fishery for each stock listed in the
limiting stock complete
TAMM sheet. However, individuals or organizations may consistently want
additional, specific visualizations based on their own needs. For example, individual tribes may want
to visualize impacts on a single stock, but use AEQ instead of ER rates. The tamm_report
function is
designed to integrate these extra components with the additional.children
argument.
The basic principle is that the individual or group can write a reusable "child" .qmd file, see this explanation using Rmarkdown), which will effectively
be inserted into the main report. As an example, we might create a simple additional
child .qmd file called extra-tamm-child.qmd
to include a small table summarizing a few
key aspects of the Nooksack Earlies stock. The contents of that file are provided in the example below.
When we call tamm_report()
, we can include as an argument additional.children =
with the file name (including file path) for
our new file. In this way we can easily include this extra content any time we create a tamm report. If desired,
multiple child files can be created, and additional.children
can take a character vector with each child file name.
When writing child documents, formatting and chunks work akin to copy-pasting a section of a quarto file out of the main file. (To easily
access the main quarto file, run tamm_report() with clean = FALSE
, which will leave tamm-visualizer.qmd
and tamm-visualizer-child.qmd
files in the folder with the TAMM file).
The child document will have access to key objects
dat.all
: the output of read_limiting_stock
with longform = TRUE
called on the TAMM;
dat.overview
: the output of of read_overview
called on the TAMM;
and dat
: the specific filtered and formatted version of the limiting stock data generated in the limiting stock tab
chunk of tamm-visualizer.qmd
and used in generating the unmarked natural stock exploitation rate figures.
When developing a child document, it may be useful to create in the working environment versions of dat.all
and dat.overview
from an example TAMM to facilitate
writing appropriate filters, plot-making code, etc. The primary quarto report loads in the tidyverse, framrsquared, kableExtra, and TAMMsupport packages,
but you can include additional packages for the child documents as needed by adding library(packagename
calls just
like in any other context.
If the additional.children
files need to read contents of additional files (or call children .qmd files of their own
to streamline looping over stocks or fisheries), the file paths to these supplemental
files can be provided in the additional.support files
argument. These files will be copied into the
same folder as the .qmd files, so the children quarto files can be written to access the supplemental
files without dealing with file paths.
For questions/support in developing child documents to extend the report, contact Collin Edwards at WDFW.
Nothing
## Not run: ##### CONTENTS FOR extra-tamm-child.qmd #####----------------------------- ## Test section Hypothetical world in which we want a table summarizing the impacts of three fisheries on the "Nooksack Earlies" stock. ```{r} kable(dat |> filter(stock == "Nooksack Earlies") |> filter(fishery_id %in% 16:18)) ``` #### END CONTENTS FOR extra-tamm-child.qmd #####-------------------------- tamm.path = "C:/Users/edwc1477/Documents/WDFW FRAM team work/NOF material/NOF 2024/NOF 2" tamm.name = "Chin2124.xslx" tamm_report(tamm.name = "Chin2124.xlsx", tamm.path = tamm.path) ## Now with our extra content, presuming `extra-tamm-child.qmd` is saved in our documents folder tamm_report(tamm.name = "Chin2124.xlsx", tamm.path = tamm.path, additional.children = "C:/Users/JohnDoe/Documents/extra-tamm-child.qmd") ## End(Not run)
## Not run: ##### CONTENTS FOR extra-tamm-child.qmd #####----------------------------- ## Test section Hypothetical world in which we want a table summarizing the impacts of three fisheries on the "Nooksack Earlies" stock. ```{r} kable(dat |> filter(stock == "Nooksack Earlies") |> filter(fishery_id %in% 16:18)) ``` #### END CONTENTS FOR extra-tamm-child.qmd #####-------------------------- tamm.path = "C:/Users/edwc1477/Documents/WDFW FRAM team work/NOF material/NOF 2024/NOF 2" tamm.name = "Chin2124.xslx" tamm_report(tamm.name = "Chin2124.xlsx", tamm.path = tamm.path) ## Now with our extra content, presuming `extra-tamm-child.qmd` is saved in our documents folder tamm_report(tamm.name = "Chin2124.xlsx", tamm.path = tamm.path, additional.children = "C:/Users/JohnDoe/Documents/extra-tamm-child.qmd") ## End(Not run)
Mapping of timestep numbers to dates in the year, taken from the TimeStep
table of
the Chinook FRAM database
timestep_chinook_fram
timestep_chinook_fram
A data frame with 4 rows and 5 columns:
Species name
id number for the time step
Span of each timestep. Timesteps start on the first of the month, and end on the last of the month. Note that Oct-Apr-2
is highlighting that timestep 4 runs from October of the current year to April of the NEXT year (equivalent to timestep 1 of the following year).
time_step_name
, but months are written out
2024 Pre-Season Chinook DB.mdb
Mapping of timestep numbers to dates in the year, taken from the TimeStep
table of
the Chinook FRAM database
timestep_coho_fram
timestep_coho_fram
A data frame with 5 rows and 5 columns:
Species name
id number for the time step
Span of each timestep. Timesteps start on the first of the month, and end on the last of the month.
time_step_name
, but months are written out consistently
2024NOF_CohoFRAMdatabase_distribution.mdb
Confirm object is dataframe
validate_data_frame( x, ..., arg = rlang::caller_arg(x), call = rlang::caller_env() )
validate_data_frame( x, ..., arg = rlang::caller_arg(x), call = rlang::caller_env() )
x |
Object to check |
... |
additional arguments |
arg |
name of argument in calling function, identified programmatically using rlang |
call |
name of calling function, identified programmatically using rlang |