⚠️There's a newer version (0.11) of this package.Take me there.
highr (version 0.10)
Syntax Highlighting for R Source Code
Description
Provides syntax highlighting for R source code. Currently it
supports LaTeX and HTML output. Source code of other languages is supported
via Andre Simon's highlight package ().