R/source_rmd.R

Defines functions source_rmd

Documented in source_rmd

#' source() Rmd files
#'
#' This function would source() .Rmd files, which can be useful in makelikefiles
#' @keywords makelikefile here
#' @param rmd_file is a string indicating the file or file path
#' @export
#' @examples
#' source_rmd(here::here("munge", "100_init_munge.Rmd"))

source_rmd <- function(rmd_file){
  knitr::knit(rmd_file, output = tempfile())
}
Kidapt/keda documentation built on Nov. 23, 2019, 3:35 a.m.