R/set_knitr_image_path.R

Defines functions set_knitr_image_path

Documented in set_knitr_image_path

#' Set image path for `knitr`
#'
#' @param verbose print out what the figure path is
#'
#' @return NULL
#' @export
set_knitr_image_path = function(verbose = FALSE) {
  fp <- knitr::fig_path()
  fp <- dirname(fp)
  fp <- paste0("images/", fp, "/")
  if (verbose) {
    message(paste0("figpath is ", fp))
  }
  knitr::opts_chunk$set(fig.path = fp)
}
muschellij2/leanbuild documentation built on Dec. 21, 2021, 11:03 p.m.