col_width

0th

Percentile

Column widths

Functions to get or set the column widths property of huxtable cols.

Usage
col_width(ht)
col_width(ht) <- value
set_col_width(ht, col, value)
Arguments
ht

A huxtable.

value

A vector. If numeric, they are treated as proportions of the table width. If character, they must be valid CSS or LaTeX lengths.

col

A col specifier. See rowspecs for details.

Details

In LaTeX, if you specify a column width, but set `wrap` to `FALSE` and have cells which overrun, then you may have problems with table position and with background colours in other cells. The workaround is to adjust the width, so that your cells no longer overrun.

Value

For col_width, the col_width attribute. For set_col_width, the ht object.

See Also

Other row/column heights: row_height

Aliases
  • col_width
  • col_width<-
  • set_col_width
  • col_width.huxtable
  • col_width<-.huxtable
Examples
# NOT RUN {
ht <- huxtable(a = 1:3, b = 1:3)
col_width(ht) <-  c(.2, .8)
col_width(ht)
print_screen(ht)
# }
Documentation reproduced from package huxtable, version 1.2.0, License: MIT + file LICENSE

Community examples

Looks like there are no examples yet.