R: Theme a huxtable

themes {huxtable} | R Documentation

## 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_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"`.

### 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_mondrian` mimics the style of a Mondrian painting, with black borders and randomized colors.

### Value

The huxtable object, appropriately styled.

### Examples

    ht <- huxtable(a = 1:5, b = 1:5)
    theme_striped(ht)

[Package huxtable version 4.2.0 Index]