Learn R Programming

flair (version 0.0.2)

flair_lines: Adds decorative formatting (flair) to parts of a string or source code, specified by line(s).

Description

flair_lines returns a string with formatting wrappers(currently only html), or applies the formatting to the source elements of a with_flair object.

Usage

flair_lines(x, lines)

# S3 method for default flair_lines(x, lines)

Arguments

x

A string or with_flair object

lines

Integer vector indicating which lines to apply the flair styling to.

Value

A string with formatting wrappers.

Examples

Run this code
# NOT RUN {
code_string <- "x <- mean(1:10, na.rm = TRUE)
sqrt(x)" %>% flair_lines(2)

# }

Run the code above in your browser using DataLab