| valign {huxtable} | R Documentation |
Functions to get or set the vertical alignment property of huxtable table cells.
valign(ht) valign(ht) <- value set_valign(ht, row, col, value, byrow = FALSE)
ht |
A huxtable. |
value |
A character vector or matrix which may be 'top', 'middle', 'bottom' or |
row |
A row specifier. See |
col |
An optional column specifier. |
byrow |
If |
Vertical alignment may not work for short text in LaTeX. Defining row heights with row_height
may help.
For valign, the valign attribute.
For set_valign, the ht object.
ht <- huxtable(a = 1:3, b = 1:3)
valign(ht) <- 'bottom'
valign(ht)
ht <- huxtable(a = 1:3, b = 3:1)
ht2 <- set_valign(ht, 'bottom')
valign(ht2)
ht3 <- set_valign(ht, 1:2, 1, 'bottom')
valign(ht3)
ht4 <- set_valign(ht, 1:2, 1:2, c('bottom', 'bottom'), byrow = TRUE)
valign(ht4)
ht5 <- set_valign(ht, where(ht == 1), 'bottom')
valign(ht5)