interactive session:
DT::datatable()html:
DT::datatable()other:
knitr::kable()
Arguments
- x
the dataframe
- caption
the table caption; a character vector or a tag object generated from
htmltools::tags$caption()- rownames
TRUE(show row names) orFALSE(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 (notNULL)- escape
whether to escape HTML entities in the table:
TRUEmeans to escape the whole table, andFALSEmeans 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), orc(-1, -3)(all columns except the first and third), orc('Species', 'Sepal.Length'); since the row names take the first column to display, you should add the numeric column indices by one when usingrownames- align
Column alignment: a character vector consisting of
'l'(left),'c'(center) and/or'r'(right). By default or ifalign = NULL, numeric columns are right-aligned, and other columns are left-aligned. Iflength(align) == 1L, the string will be expanded to a vector of individual letters, e.g.'clc'becomesc('c', 'l', 'c'), unless the output format is LaTeX.- ...
Other arguments (see Examples and References).