interactive session: DT::datatable()
html: DT::datatable()
other: knitr::kable()
dyn_table(x, caption = NULL, rownames = FALSE, escape = TRUE, align, ...)
the dataframe
the table caption; a character vector or a tag object
generated from htmltools::tags$caption()
TRUE
(show row names) or FALSE
(hide row names)
or a character vector of row names; by default, the row names are displayed
in the first column of the table if exist (not NULL
)
whether to escape HTML entities in the table: TRUE
means
to escape the whole table, and FALSE
means not to escape it;
alternatively, you can specify numeric column indices or column names to
indicate which columns to escape, e.g. 1:5
(the first 5 columns),
c(1, 3, 4)
, or c(-1, -3)
(all columns except the first and
third), or c('Species', 'Sepal.Length')
; since the row names take
the first column to display, you should add the numeric column indices by
one when using rownames
Column alignment: a character vector consisting of 'l'
(left), 'c'
(center) and/or 'r'
(right). By default or if
align = NULL
, numeric columns are right-aligned, and other columns
are left-aligned. If length(align) == 1L
, the string will be
expanded to a vector of individual letters, e.g. 'clc'
becomes
c('c', 'l', 'c')
, unless the output format is LaTeX.
Other arguments (see Examples and References).
Other utils:
add_author()
,
add_report_numbers()
,
check_dependencies()
,
column_start()
,
column_width()
,
cover_info()
,
create_report()
,
references()
,
render_natbib()
,
validate_doi()