huxtable (version 4.6.0)

themes: Theme a huxtable

Description

These functions quickly set default styles for a huxtable.

Usage

theme_plain(ht, position = "left")

theme_basic(ht, header_row = TRUE, header_col = TRUE)

theme_striped(ht, stripe = grDevices::grey(0.9), header_row = TRUE, header_col = TRUE)

theme_grey(ht, header_row = TRUE, header_col = TRUE)

theme_blue(ht, header_row = TRUE, header_col = TRUE)

theme_orange(ht, header_row = TRUE, header_col = TRUE)

theme_green(ht, header_row = TRUE, header_col = TRUE)

theme_article(ht, header_row = TRUE, header_col = TRUE)

theme_mondrian(ht, prop_colored = 0.1, font = "Arial")

Arguments

ht

A huxtable object.

position

"left", "center" or "right"

header_row

Logical: style first row differently?

header_col

Logical: style first column differently?

stripe

Background colour for alternate rows

prop_colored

Roughly what proportion of cells should have a primary-color background?

font

Font to use. For LaTeX, try "cmss".

Value

The huxtable object, appropriately styled.

Details

theme_plain is a simple theme with a bold header, a grey striped background, and an outer border.

theme_basic just adds a border for header rows and/or columns.

theme_striped uses different backgrounds for alternate rows, and for headers.

theme_article is similar to the style of many scientific journals. It sets horizontal lines above and below the table.

theme_grey, theme_blue, theme_orange and theme_green use white borders and subtle horizontal stripes.

theme_mondrian mimics the style of a Mondrian painting, with black borders and randomized colors.

Examples

Run this code
# NOT RUN {
theme_striped(jams)
theme_plain(jams)
theme_basic(jams)
theme_article(jams)
theme_mondrian(jams)
theme_grey(jams)
theme_blue(jams)
theme_orange(jams)
theme_green(jams)
# }
# NOT RUN {
  quick_pdf(
          theme_striped(jams),
          theme_plain(jams),
          theme_basic(jams),
          theme_article(jams),
          theme_mondrian(jams),
          theme_grey(jams),
          theme_blue(jams),
          theme_orange(jams),
          theme_green(jams)
        )
# }

Run the code above in your browser using DataLab