R/notes.R

Defines functions notes

Documented in notes

#' @title Notes template
#'
#' @description This function produces an R Markdown document for notetaking
#' @param metadata Extra yaml metadata to include. Defaults to NULL.
#' @keywords template
#' @export
#' @examples
#' rmarkdown::render("doc.Rmd", notes())

notes <- function(..., metadata = NULL) {
  #if(type == "pdf"){
  pdf_document_format(...,
                      format = "notes",
                      template = "notes.tex",
                      metadata = metadata)
  # }
  # if(type == "word"){
  #   word_document_format(...,
  #                       format = "homework",
  #                       template = "homework.docx",
  #                       metadata = "homework_word.yaml")
  # }
  # if(!type %in% c("pdf", "word")) stop("Other formats not yet supported")
}
louisahsmith/louisahstuff documentation built on Aug. 9, 2022, 4:16 a.m.