knitr::opts_chunk$set(echo = FALSE) #load chunks from r script # knitr::read_chunk("AnnualReportChunks.R")
Table 3: Post-season summary exploitation rates, escapements, and cohort abundances for naturally spawning Coho MUs in r run.year
.
t3_per <- annual.tbl.third %>% filter(psc.fishery.name %notin% c("escapement", "cohort")) %>% mutate_if(is.numeric, ~percent(.,accuracy = 0.1, suffix = "%")) t3_cnt <- annual.tbl.third %>% filter(psc.fishery.name %in% c("escapement", "cohort")) %>% mutate_if(is.numeric, ~comma(.)) t3 <- bind_rows(t3_per, t3_cnt) %>% # mutate(psc.fishery.name = str_replace(psc.fishery.name, "&", "\\\\&")) %>% rename(`Fishery Name` = "psc.fishery.name") t3_gt <- t3 %>% gt()%>% tab_options(table.width = '2200px', table.font.size = '24px') %>% opt_css(css = ' @media print { .alert-danger { bgcolor: 42D4F4 !important; color: yellow !important; }} ') %>% tab_style(style = cell_text(weight = 'bold'), locations = cells_body(column=1)) %>% tab_style(style = cell_text(weight = 'bold'), locations =cells_column_labels()) %>% tab_style(style = "background-color: #E0FFFF !important;", locations = cells_body(row=12)) %>% tab_style(style = "background-color: #E0FFFF !important;", locations = cells_body(row=22)) %>% tab_style(style = "background-color: #E0FFFF !important;", locations = cells_body(row=24)) %>% text_transform(fn = function(x) {paste0(x, '<sup>*</sup>')}, locations = cells_body(columns = c(`Lower Fraser`), rows = 25)) %>% text_transform(fn = function(x) {paste0(x, '<sup>‡</sup>')}, locations = cells_body(columns = c(`Georgia Strait`), rows = 25)) %>% text_transform(fn = function(x) {paste0(x, '<sup>†</sup>')}, locations = cells_body(columns = c(`Lower Fraser`, `Georgia Strait`), rows = 26)) %>% tab_footnote(footnote = ("*Modelled values of terminal run size occuring after lower Fraser in river fisheries.")) %>% tab_footnote(footnote = md("<sup>†</sup>Modelled values of terminal run size that are not directly estimated.")) %>% tab_footnote(footnote = md("<sup>‡</sup>Modelled values that are not directly estimated.")) t3_gt
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.