knitr::opts_chunk$set(echo = FALSE, message = FALSE, warning = FALSE, 
                      dpi = 600)

title: r ifelse(complete.cases(title_document), title_document, "A formatted table")

FT
CapText1 <- ifelse(complete.cases(table_caption), 
                   paste0("*", table_caption, "* "), "")

CapText2 <- ifelse("File" %in% names(DF), 
                   paste0("*Source simulated data: ", str_comma(unique(DF$File)), "*"), 
                   "")

CapText <- paste0(CapText1, CapText2)

r CapText

if(any(complete.cases(highlight_gmr_colors))){
   TableKeyText_gmr <- "**Key for color-coded GMR values:**"
} else {
   TableKeyText_gmr <- ""
}

r TableKeyText_gmr

if(any(complete.cases(highlight_gmr_colors))){

   make_gmr_highlight_key(highlight_gmr_colors = highlight_gmr_colors)

} 
if(any(complete.cases(highlight_so_cutoffs))){
   TableKeyText_so <- "**Key for color-coded S/O values:**"
} else {
   TableKeyText_so <- ""
}

r TableKeyText_so

if(any(complete.cases(highlight_so_cutoffs))){

   make_so_highlight_key(highlight_so_cutoffs = highlight_so_cutoffs, 
                         highlight_so_colors = highlight_so_colors)

} 


shirewoman2/Consultancy documentation built on Feb. 18, 2025, 10 p.m.