line_number | R Documentation |
Line Number plugin
line_number(use_line_number = TRUE, start_from = 1)
use_line_number |
Logical |
start_from |
A numeric indicating where to start to count from |
A list (named) with the name of the plugin, the class passed to the render function and the line number in which the line numbers will start from (optional).
if (interactive()) {
highlighter::highlighter(
"print('Hello, world!')\ncat <- \"Aristofanes\"\nstr(some_variable)",
language = "r",
plugins = list(
line_number(
use_line_number = TRUE,
start_from = 2
)
)
)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.