Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

valign

Set the vertical alignment of cell content


Description

Allowed values are "top", "middle", "bottom" or NA.

Usage

valign(ht)
valign(ht) <- value
set_valign(ht, row, col, value )
map_valign(ht, row, col, fn)

Arguments

ht

A huxtable.

row

A row specifier. See rowspecs for details.

col

An optional column specifier.

fn

A mapping function. See mapping-functions for details.

value

A character vector or matrix.

Set to NA to reset to the default, which is "top".

Details

Vertical alignment may not work for short text in LaTeX. Defining row heights with row_height() may help.

Value

valign() returns the valign property. set_valign() returns the modified huxtable.

Examples

valign(jams) <-  "top"
valign(jams)

jams2 <- set_valign(jams,
      "bottom")
valign(jams2)

jams3 <- set_valign(jams,
      2:3, 1, "bottom")
valign(jams3)

jams4 <- map_valign(jams,
      by_rows(
        "bottom",
        "top")
      )
valign(jams4)

huxtable

Easily Create and Style Tables for LaTeX, HTML and Other Formats

v5.3.0
MIT + file LICENSE
Authors
David Hugh-Jones [aut, cre]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.