To insert YAML header for Rnotebook
snippet yaml_notebook_html
#' ---
#' title: "${1:title}"
#' author: "${2:author}"
#' knit: (function(inputFile, encoding) { rmarkdown::render(inputFile, encoding = encoding, output_file = sprintf("%s_%s.html", format(Sys.Date(), "%y%m%d"), basename(tools::file_path_sans_ext(inputFile))))})
`r paste("#' date: '\u0060r paste(\u0022", format(Sys.time(), "%d/%m/%Y")," - Dernière MAJ:\u0022, format(Sys.time(), \u0022%d/%m/%Y\u0022))\u0060'", sep = "")`
#' output :
#' html_document:
#' highlight: tango
#' theme: united
#'---
To insert YAML header for Rmd document
snippet yaml_Rmd_html
---
title: "${1:title}"
author: "${2:author}"
knit: (function(inputFile, encoding) { rmarkdown::render(inputFile, encoding = encoding, output_file = sprintf("%s_%s.html", format(Sys.Date(), "%y%m%d"), basename(tools::file_path_sans_ext(inputFile))))})
`r paste("date: '\u0060r paste(\u0022", format(Sys.time(), "%d/%m/%Y")," - Dernière MAJ:\u0022, format(Sys.time(), \u0022%d/%m/%Y\u0022))\u0060'", sep = "")`
output:
html_document:
highlight: tango
theme: united
toc: $(4:yes)