# For simplicity just making a standalone master file for this short 5 minute talk, else
# gets a bit too complicated

# load_all()    # Do this the first time and if update the package while writing
# the talk. Have commented as it reloads each time, which isn't necessary.
library(dplyr)
library(tibble)
library(kableExtra)

long_talk <- FALSE    # if FALSE then chunks with eval=long_talk will not be
                      # evaluated, as we are writing a shorter version. Now
                      # doing two versions of sections, since was getting in a
                      # mess trying to switch individual chunks.
short_talk <- !long_talk

# Some of the chunks will need fixing if TRUE, can do if needed. Or maybe just
# simplify things. no time right now (doing dfo/noaa 2025 talk).
long_motivation <- FALSE  # whether to include the original longer motivation
                         # slides (EAFM, Brianna chat, gslea, open data, why R,
                         # why github). Opposite is
                         # short_motivation summarising some of that (or set
                         # FALSE here if not wanted).
short_motivation <- !long_motivation

explain_assessment <- FALSE  # set to TRUE for two slides explaining stock assessment

more_details <- FALSE        # set to TRUE for some of the more detailed slides
                             # (setting FALSE for national EAFM talk)


knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "",
  global.par = TRUE,  # set par values to be global (once changed)
  fig.width = 6,
  fig.height = 4,
  fig.align = "center",
  out.width = "60%",
  #out.height = 400
  cache = TRUE,
  cache_path = "pacea-talk-short-cache/",
  fig.path = "pacea-talk-short-cache-figs/"
)

options(pillar.print_max = 6,   # number of rows to show for a tibble
        pillar.print_min = 6)
par("mai" = c(1.02, 0.82, 0.3, 0.42))   # default is 1.02 0.82 0.82 0.42

# https://bookdown.org/yihui/rmarkdown-cookbook/font-color.html . For example:
# `r colorize("hello", "blue")`
colorize <- function(x, color = "red"){
  if(knitr::is_latex_output()) {
    sprintf("\\textcolor{%s}{%s}", color, x)
  } else if(knitr::is_html_output()) {
    sprintf("<span style='color: %s;'>%s</span>", color,
      x)
  } else x
}
knitr::include_graphics(paste0(here::here(),
                               "/talks/talks-manual-figures/pacea-title-slide-future-habitat-2025.png"))

















pbs-assess/PACea documentation built on April 17, 2025, 11:36 p.m.