This is a very simple table generator. It is simple by design. It is not intended to replace any other R packages for making tables. This is a trimmed down version of the original kable function in knitr package. Please refer to knitr's kable function for details.
kable(
x,
format,
digits = getOption("digits"),
row.names = NA,
col.names = colnames(x),
align,
caption = NULL,
escape = TRUE,
...
)
an R object (typically a matrix or data frame)
a character string; possible values are latex
,
html
, markdown
, pandoc
, and rst
; this will be
automatically determined if the function is called within knitr; it
can also be set in the global option knitr.table.format
the maximum number of digits for numeric columns (passed to
round()
); it can also be a vector of length ncol(x)
to set
the number of digits for individual columns
a logical value indicating whether to include row names; by
default, row names are included if rownames(x)
is neither
NULL
nor identical to 1:nrow(x)
a character vector of column names to be used in the table
the alignment of columns: a character vector consisting of
'l'
(left), 'c'
(center) and/or 'r'
(right); by
default, numeric columns are right-aligned, and other columns are
left-aligned; if align = NULL
, the default alignment is used
the table caption
escape special characters when producing HTML or LaTeX tables
other arguments (see examples)