| regsen_table | R Documentation |
Formats the results of regsen_bounds() or regsen_breakdown() for a
manuscript. The format argument selects the output flavour, so the same
call works in an Rmd/Qmd document knitting to PDF, to HTML, or to a
Markdown target such as GitHub or Typst.
regsen_table(
x,
format = NULL,
digits = 3,
caption = NULL,
label = NULL,
notes = NULL,
booktabs = TRUE,
threeparttable = TRUE,
align = NULL,
col_names = NULL,
escape = TRUE,
max_rows = NULL,
...
)
x |
A |
format |
One of |
digits |
Significant digits for the numeric columns. |
caption |
Table caption. |
label |
LaTeX label, used as |
notes |
Character vector of table notes, one element per line. Set
to |
booktabs |
Logical; use |
threeparttable |
Logical; wrap LaTeX output and its notes in a
|
align |
Column alignment string, e.g. |
col_names |
Optional character vector of column headings. |
escape |
Logical; escape special characters. Set |
max_rows |
Optional integer. If the sweep is longer than this, the
table is thinned to |
... |
Passed to |
For LaTeX the default follows the convention most economics journals
expect: booktabs rules, and table notes wrapped in a threeparttable
environment so the note block is set to the width of the table rather
than the width of the page. Both are switchable.
Anything this function does not expose can be done by taking
as.data.frame() of the object and passing it to the table package of
your choice; nothing here is a dead end.
A knitr_kable object, which prints as the requested markup and
renders directly in an Rmd/Qmd chunk.
data(bfg2020)
res <- regsen_bounds(
avgrep2000to2016 ~ tye_tfe890_500kNI_100_l6 + log_area_2010 + lat + lon,
data = bfg2020, compare = c("log_area_2010", "lat", "lon"),
cbar = c(0.1, 0.5, 1)
)
regsen_table(res, format = "markdown", digits = 3)
regsen_table(res, format = "latex", notes = TRUE,
caption = "Identified sets", label = "idset")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.