as.character.emphatic {emphatic} | R Documentation |
Convert an emphatic
data.frame, matrix or atomic vector into a character string.
Description
The output contains ANSI escape codes to colour the elements in the
object. This string would then be suitable to pass on to fansi
for further manipulation e.g. conversion to HTML for displaying in a vignette.
Usage
## S3 method for class 'emphatic'
as.character(x, ..., mode = "ansi")
Arguments
x |
|
... |
other arguments passed on to |
mode |
Render mode 'ansi' (default) or 'html' determines how the colours will be represented in text. If you're in a terminal or console, then choose 'ansi'. |
Value
A character string of the requested mode
Examples
mtcars |>
as_emphatic() |>
as.character()
[Package emphatic version 0.1.8 Index]