One known issue with autoWidth = FALSE is that the width option for columns will not work, so if you want to configure widths for columns, you have to use autoWidth = TRUE , .
Make Beautiful Tables with the Formattable Package | Displayr
A little bit of CSS can make a plain HTML table look decent. Figure is a screenshot of an HTML table to which the following CSS rules are applied:
Table function | R Documentation
The floating position of the table is controlled by the argument position. For example, we can try to force a table to float to the bottom of a page via position = "!b" :
By default, datatable() shows the column names of the data in the table, and you can use a custom character vector for the table header. There are a few possibilities. The first one is, you provide a new character vector to completely replace the column names of the data, .
Warning: If you have a super long table, you should be cautious when you use column_spec as the xml node modification takes time.
one or more objects which can be interpreted as factors (including character strings), or a list (or data frame) whose components can be so interpreted. (For , arguments passed to specific methods for , unused.)
As we mentioned in Section , a table can be cross-referenced when it has a caption and the output format is from bookdown.
DataTables has a large number of initialization options , which make it very flexible to customize the table. You can write these options in a list in R, and datatable() will automatically convert them to JSON as needed by DataTables.
Unfortunately, things are not as simple as changing the default value for the stringsAsFactors arguments to () and () (which of course, even though in theory it should not matter, will have considerable impact). When adding the stringsAsFactors argument to () in R , data() was changed to use
character string: if non-empty declares the encoding used on a file (not a connection) so the character data can be re-encoded. See the 8766 Encoding 8767 section of the help for file , the 8766 R Data Import/Export Manual 8767 and 8766 Note 8767 .
integer: the maximum number of rows to read in. Negative and other invalid values are ignored.