Learn R Programming

highlighter (version 0.1)

line_number: Line Number plugin

Description

Line Number plugin

Usage

line_number(use_line_number = TRUE, start_from = 1)

Value

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).

Arguments

use_line_number

Logical

start_from

A numeric indicating where to start to count from

Examples

Run this code
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
      )
    )
  )
}

Run the code above in your browser using DataLab