When I create an R Markdown (.Rmd) document, by default the date in the header is in the mm/dd/yyyy format, for example 4/3/2022. I would like to change it so that it displays the full name of the month followed by the year, for example April 2022. Currently, I have to change the date manually once the document is created, but is there some sort of global preference that allows the user to change default date format? I looked through all of the RStudio preferences but I didn't see anything related to the default date format for R Markdown. I also did a quick Google search, but most of the results seem to be focused on generating the date dynamically, whereas I would actually prefer to use the date that the document was created (i.e., static date).
CodePudding user response:
snippet
Tools > Global Options > Code > Edit Snippets or use usethis::edit_rstudio_snippets()
. Space senstitive!
Then when starting a new markdown doc, you can insert that snippet.
markdown template
For this, we should create a small package and install it.