Home > OS >  set date format for knitr document
set date format for knitr document

Time:01-22

Is there a way to set a global option (either through options() or knitr::opts_chunk$set() or something else) to set all dates in a knitr/Rmd document to be formatted in a particular style. So instead of having to write format(DATE, '%d %m %Y') each time I have a date I can just write DATE and have the formatting done automagically?

CodePudding user response:

Following the enter image description here

  •  Tags:  
  • Related