R/lab_report.R

Defines functions lab_report

Documented in lab_report

#' lab_report
#'
#' Acts as a simplified template to common parameters passed to
#' rmarkdown::html_document
#'
#' @param highlight Syntax highlighting style. Supported styles include
#'  "default", "tango", "pygments", "kate", "monochrome", "espresso", "zenburn",
#'  "haddock", and "textmate". Pass \code{NULL} to prevent syntax highlighting.
#' @param theme Visual theme ("default", "cerulean", "journal", "flatly",
#'  "readable", "spacelab", "united", "cosmo", "lumen", "paper", "sandstone",
#'  "simplex", or "yeti"). Pass \code{NULL} for no theme (in this case you can
#'  use the \code{css} parameter to add your own styles).
#' @param toc \code{TRUE} to include a table of contents in the output
#' @param toc_float \code{TRUE} to float the table of contents to the left of the
#'  main document content. Rather than \code{TRUE} you may also pass a list of
#'  options that control the behavior of the floating table of contents. See the
#'  \emph{Floating Table of Contents} section below for details.
#' @param code_download Embed the Rmd source code within the document and provide
#'  a link that can be used by readers to download the code.
#' @param code_folding Enable document readers to toggle the display of R code
#'  chunks. Specify \code{"none"} to display all code chunks (assuming
#'  they were knit with \code{echo = TRUE}). Specify \code{"hide"} to hide all R
#'  code chunks by default (users can show hidden code chunks either
#'  individually or document-wide). Specify \code{"show"} to show all R code
#'  chunks by default.
#' 
#' @export

lab_report <- function(highlight = "pygments", theme = "spacelab",
  toc = TRUE, toc_float = TRUE, 
  code_download = TRUE, code_folding = "show"){
  rmarkdown::html_document(highlight = highlight,
    theme = theme,
    toc = toc,
    toc_float = toc_float,
    code_download = code_download,
    code_folding = code_folding)
}
andrewpbray/reed-oilabs documentation built on April 8, 2020, 2:26 a.m.