To cite package ‘formatR’ in publications use:

Xie Y (2026). formatR: Format R Code Automatically. R package version 1.14.1, https://github.com/yihui/formatr.

Corresponding BibTeX entry:

  @Manual{,
    title = {formatR: Format R Code Automatically},
    author = {Yihui Xie},
    year = {2026},
    note = {R package version 1.14.1},
    url = {https://github.com/yihui/formatr},
  }