I like the way RStudio formats R code (Code -> Reformat Code or 'Ctrl + Shift + A'). I would like to apply this a githook or GitHub action, but I cannot find out what command is actually run or how to achieve similar with formatR or Styler.
Any idea what package and command is run behind the scenes or how to replicate this?