Skip to contents

R8's theme with the styles of the named roles replaced. Each argument is a role, whose value is a list of any of color (a hex code such as "#6CA3A0", or NA for the host's default color), bold, and italic; the members it leaves out keep R8's style. ANSI output in 256 colors uses the nearest color of the 256-color palette. options(r8.theme = ) sets the theme of format() and print(), and their theme argument overrides it.

Usage

r8theme(...)

# S3 method for class 'r8_theme'
format(x, ...)

# S3 method for class 'r8_theme'
print(x, ...)

Arguments

...

Styles by role, each a list of color, bold, and italic.

x

An r8_theme object.

Value

An r8_theme object: a style per role.

Details

R8's theme shows brackets, variants, and highlighted text in rtemis teal (#6CA3A0). Type names and strong text are bold. Summaries and muted text are gray (#808080). Emphasis is italic. The names of base types take rtemislive's colors of column types, at a lightness that reads on light and dark backgrounds: double #2E81CC, integer #008C92, factor #128F5A, character #CC566E, logical #866BD8, and Date and POSIXct #C056AC.

Author

EDG

Examples

th <- r8theme(type_name = list(color = "#0F6A66"), muted = list(italic = TRUE))
th[["type_name"]]
#> $color
#> [1] "#0F6A66"
#> 
#> $index
#> [1] 23
#> 
#> $bold
#> [1] TRUE
#> 
#> $italic
#> [1] FALSE
#>