fansi (version 0.3.0)

fansi_lines: Colorize Character Vectors

Description

Color each element in input with one of the "256 color" ANSI CSI SGR codes. This is intended for testing and demo purposes.

Usage

fansi_lines(txt, step = 1)

Arguments

txt

character vector or object that can be coerced to character vector

step

integer(1L) how quickly to step through the color palette

Value

character vector with each element colored

Examples

Run this code
# NOT RUN {
NEWS <- readLines(file.path(R.home('doc'), 'NEWS'))
writeLines(fansi_lines(NEWS[1:20]))
writeLines(fansi_lines(NEWS[1:20], step=8))
# }

Run the code above in your browser using DataCamp Workspace