col_width {huxtable}R Documentation

Column widths

Description

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

Examples


ht <- huxtable(a = 1:3, b = 1:3)
col_width(ht) <-  c(.2, .8)
col_width(ht)
print_screen(ht)

[Package huxtable version 3.0.0 Index]