View source: R/kbl_autoescape.R
kbl.escape | R Documentation |
Automatically escape latex code or convert to equivalent html depending on knit output
kbl.escape( df, format = NULL, row.names = NA, col.names = NA, align = "c", caption = NULL, label = NULL, format.args = list(), escape = TRUE, table.attr = "", booktabs = FALSE, longtable = FALSE, valign = "t", position = "", centering = TRUE, linebreaker = "\n", ... )
df |
data frame |
format |
A character string. Possible values are |
row.names |
Logical: whether to include row names. By default, row names
are included if |
col.names |
A character vector of column names to be used in the table. |
align |
Choose from "l", "c" or "r" |
caption |
The table caption. |
label |
The table reference label. By default, the label is obtained
from |
format.args |
A list of arguments to be passed to |
escape |
Boolean; whether to escape special characters when producing
HTML or LaTeX tables. When |
table.attr |
A character string for addition HTML table attributes. This is convenient if you simply want to add a few HTML classes or styles. For example, you can put 'class="table" style="color: red"'. |
booktabs |
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. |
longtable |
T/F for whether to use the longtable format. If you have a table that will span over two or more pages, you will have to turn this on. |
valign |
You probably won't need to adjust this latex option very often.
If you are familar with latex tables, this is the optional position for the
tabular environment controling the vertical position of the table relative
to the baseline of the surrounding text. Possible choices are |
position |
This is the "real" or say floating position for the latex
table environment. The |
centering |
T (default)/F. Whether to center tables in the table environment. |
linebreaker |
Symbol for linebreaks to replace. Default is |
... |
Arguments passed on to
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.