Create a kable table with some reasonable ATLAS defaults.
fmt_kbl(
x,
booktabs = TRUE,
linesep = "",
escape = FALSE,
position = "left",
latex_options = "HOLD_position",
...
)
For kable()
, x
is an R object, which is typically a
matrix or data frame. For kables()
, a list with each element being a
returned value from kable()
.
T/F for whether to enable the booktabs format for tables. I personally would recommend you turn this on for every latex table except some special cases.
By default, in booktabs tables, kable
insert an extra space
every five rows for clear display. If you don't want this feature or if you
want to do it in a different pattern, you can consider change this option.
The default is c('', '', '', '', '\addlinespace'). Also, if you are not
using booktabs, but you want a cleaner display, you can change this to ''.
Boolean; whether to escape special characters when producing
HTML or LaTeX tables. When escape = FALSE
, you have to make sure
that special characters will not trigger syntax errors in LaTeX or HTML.
This is the "real" or say floating position for the latex
table environment. The kable
only puts tables in a table environment when
a caption is provided. That is also the reason why your tables will be
floating around if you specify captions for your table. Possible choices are
h
(here), t
(top, default), b
(bottom) and p
(on a dedicated page).
A character vector for LaTeX table options. Please see
package vignette for more information. Possible options include
basic
, striped
, hold_position
, HOLD_position
, scale_down
& repeat_header
.
striped
will add alternative row colors to the table. It will imports
LaTeX
package xcolor
if enabled. hold_position
will "hold" the floating
table to the exact position. It is useful when the LaTeX
table is contained
in a table
environment after you specified captions in kable()
. It will
force the table to stay in the position where it was created in the document.
A stronger version: HOLD_position
requires the float
package and specifies [H]
.
scale_down
is useful for super wide table. It will automatically adjust
the table to page width. repeat_header
in only meaningful in a longtable
environment. It will let the header row repeat on every page in that long
table.
Additional parameters passed to kableExtra::kbl()
.
A kable object.