hl_adjust {emphatic}R Documentation

Set options for printing on the emphatic matrix or data.frame

Description

Set options for printing on the emphatic matrix or data.frame

Usage

hl_adjust(.data, na, full_colour, text_mode, text_contrast)

Arguments

.data

emphatic matrix or data.frame

na

Character string to display for NA values. Default 'NA'

full_colour

Use 24bit ANSI escape codes? default: FALSE - use 8bit colour. Note: RStudio only supports 8 bit ANSI output (24bit ANSI is rendered invisibly in Rstudio). For 24bit colour output, try R in the terminal e.g. 'iTerm' on OSX.

text_mode

How to handle text if no text colour has been explicitly specified by the user.

contrast

(default) automatically select a contrasting colour for enhanced readability.

asis

render text in the default text colour for the output device, unless the user has already specified a text colour at this location

remove

remove all text without a user-defined colour

text_contrast

When text_mode='contrast' this numeric value in range [0, 1] adjusts the visibility. Default: 1 (high contrast)

Value

emphatic object with updated options

Examples

mtcars |>
  hl('red') |>
  hl_adjust(text_contrast = 0.3)

[Package emphatic version 0.1.8 Index]