Is it possible to create a default comment header template in R for all new scripts?
I generally include some standard info at the top of all my scripts and would like
If you are using vim you could define a snippet like this ultisnips one in a separate R-snippet file:
snippet header "R Header template" b
#' ---
#' title: ${1:title here}
#' author: ${2:John Smith (John@Smith.com)}
#' date: ${3:`date +%Y-%m-%d`}
#' ---
endsnippet
You would only have to type header
which is a massive time-saver especially since it fills in predefined values (such date).
This seems also Rmarkdown compatible as discussed here.