R/header.rmd.R

Defines functions header.rmd

Documented in header.rmd

#' Snippet function to add header to a current Rmd opened file
#'
#' Shorthand to add Rmd header
#'
#' @return Inserts header content for Rmd file
#'
#' @examples
#' if(interactive())
#' header.rmd()
#' @export
#'

header.rmd <- function() {
  insertInText(paste0("
<!---

Document Path: ", rstudioapi::getActiveDocumentContext()$path, "

Author:

Date: ", Sys.Date(), "

Title:

Description:

Required Files:

Exported Files:

R Version: ", version$version.string, "


--->"))
}

Try the quickcode package in your browser

Any scripts or data that you put into this service are public.

quickcode documentation built on April 11, 2025, 5:49 p.m.