prettycode (version 1.1.0)

highlight: Syntax highlight R code

Description

Syntax highlight R code

Usage

highlight(code, style = default_style())

Arguments

code

Character vector, each element is one line of code.

style

Style functions, see default_style().

Value

Character vector, the highlighted code.

Examples

Run this code
# NOT RUN {
highlight(deparse(ls))
cat(highlight(deparse(ls)), sep = "\n")
# }

Run the code above in your browser using DataCamp Workspace