layout_html: Html table

layout_htmlR Documentation

Html table

Description

layout_html prints layout object as a html table.

Usage

layout_html(
  object,
  caption = NULL,
  header = NULL,
  footer = NULL,
  abbreviations = NULL,
  labels = NULL,
  signif_digits = NULL,
  rgroup = NULL,
  n.rgroup = NULL,
  units = NULL,
  ...
)

Arguments

object

A layout object including a body containing the table.

caption

An optional character element for table caption.

header

An optional character vector used for column headers. If header is not specified an there are row groups in the table object, the header will be blank (ie only row group headers displayed).

footer

An optional character element for table footer. Abbreviations, if used, will also be added to the footer.

abbreviations

An optional named vector referenced by the abbreviations query which matches abbreviations in the table body, variables column, header, column groups and row headers and adds the corresponding explanations to the table footer.

labels

An optional named vector which will be used for replacing names in variables column, header, column groups and row headers.

signif_digits

An optional numeric element. If specified, all numeric columns in table body will be rounded to the specified number of significant digits.

rgroup

An optional numeric vector specifying replacement length for row groups.

Value

A html table.

See Also

prepare for making a layout object.

Other table layout: add_colgroup(), add_cols(), add_rowgroup(), add_units(), firstrow_css(), order_by_vector(), order_layout(), prepare(), print_abbrev(), query_abbrev()

Examples

html_out <- layout_html(example_layout,
    ## rgroup=rgr,
    css.rgroup="align-content: center;font-weight: bold;font-size: 1em;",
    caption='cap',
    footer='footer here',
    abbreviations=abbrevs,
    labels=varnames,
    signif_digits=3
    ##css.cell=subheader_css(test3, "align-content: center;font-size: 2em;")
    )

eeenilsson/layout documentation built on Sept. 26, 2022, 8:14 p.m.