as_emphatic {emphatic}R Documentation

Convert a data.frame, matrix or atomic vector into an emphatic version

Description

This usually does not need to be called explicitly by the user.

Usage

as_emphatic(.data)

Arguments

.data

data.frame, matrix or atomic vector

Details

The function adds the attributes necessary for keeping track of the colours assigned to each cell. This consists of 2 character matrices - one for the text colour and one for the background colour.

Colour information is stored as R colour names (e.g. 'red') or 6 character hex colours (e.g. '#ff0000').

Value

An emphatic version of the given .data with added attributes for text and fill colours

Examples

mtcars |>
  head() |>
  as_emphatic()

[Package emphatic version 0.1.8 Index]