Description Usage Arguments Value References See Also
View source: R/external_highlight.R
Multi language source code highlighter
1 2 3 4 5 6 7 |
file |
Source file to highlight. |
outfile |
Destination of the highlighted code. When NULL, the code is simply returned as a character vector |
theme |
One of the themes. See |
lang |
The language in which the code is to be interpreted. If this argument is not given, it will be deduced from the file extension. |
type |
Output format. See |
line_numbers |
if TRUE, the result will include line numbers |
doc |
if TRUE, the result is a stand alone document, otherwise, just a portion to include in a document. |
code |
If code is given, then the source code is not read from the file. |
Nothing if outfile is given, with the side effect of writing into the file.
The result as a character vector if outfile is NULL
Based on the highlight library from http://www.andre-simon.de/index.html
highlight
to highlight R code using the information from the
parser.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.