Description Usage Arguments Examples
Set column widths to tab workbook
1 2 | set_wb_widths(tab, left_header_col_widths = NULL,
body_header_col_widths = NULL)
|
tab |
The core tab object |
left_header_col_widths |
Width of row header columns you wish to set in Excel column width units. If singular, value is applied to all row header columns. If a vector, vector must have length equal to the number of row headers in workbook. Use special case "auto" for automatic sizing. Default (NULL) leaves column widths unchanged. |
body_header_col_widths |
Width of body header columns you wish to set in Excel column width units. If singular, value is applied to all body columns. If a vector, vector must have length equal to the number of body headers in workbook. Use special case "auto" for automatic sizing. Default (NULL) leaves column widths unchanged. |
1 2 3 4 5 | crosstab <- read.csv(system.file("extdata", "example_crosstab.csv", package="xltabr"))
tab <- initialise()
colnames <- c("drive", "age")
tab <- add_body(tab, crosstab, left_header_colnames = colnames)
tab <- set_wb_widths(tab, left_header_col_widths = "auto", body_header_col_widths = c(7,14,28))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.