print_grouped_xtable: Print grouped table

Description Usage Arguments

Description

Writes a table as a LaTeX tabular where groups are separated by a vertical space and repeated entries of the same entry are omitted.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
print_grouped_xtable(dt, group_by = NULL, align = NULL,
  vertical_gap = 0.5, vertical_gap_units = "baselineskip",
  out.file = NULL, overwrite = TRUE, booktabs = TRUE,
  tab.environment = c("tabular", "tabularx", "longtable"),
  tabularx.width = "\\linewidth",
  logical_fn = c(`\\parbox[c]{0.9\\PositionColumnWidth}{\\centering\\XSolidBold}`
  = FALSE,
  `\\parbox[c]{0.9\\PositionColumnWidth}{\\centering\\CheckmarkBold}`
  = TRUE, ` ` = NA),
  column_format = getOption("xtable.sanitize.colnames.function",
  function(x) sprintf("\\textbf{%s}", x)), caption = NULL,
  label = NULL, no_space_grep = NULL)

Arguments

dt

A data.table or coercible to such.

group_by

The columns that identify groups. If NULL, the default, any columns with duplicate entries are used.

align

The character vector passed to xtable.

vertical_gap

A nominal numeric value for the narrowest vertical gap.

vertical_gap_units

The units of vertical_gap.

out.file

The file to divert the LaTeX code to.

overwrite

(logical, default: TRUE) Should out.file be overwritten? If FALSE, text is appended to out.file.

booktabs

(logical, default: TRUE) Should \usepackage style be applied to the table be used?

tab.environment

Which tabular environment should the table be enclosed in. By default tabular.

tabularx.width

If tab.environment = "tabularx", what should the total width of the table be (i.e. the first argument of tabularx)?

logical_fn

How should logical columns be reformatted?

column_format

How should column names be formatted? Defaults to the xtable default, or boldface if that option is NULL.

caption, label

A caption (placed above) the table and the correponding label.

no_space_grep

If the value of the group (coerced to character) matches this perl regular expression, no group space is added.


HughParsonage/grattanCharts documentation built on May 8, 2019, 10:52 a.m.