Learn R Programming

tables (version 0.7.64)

table_options: Set or query options for the table formatting.

Description

These functions set or query options for table formatting in LaTeX or HTML output.

Usage

table_options(...)
booktabs(...)
htmloptions(head=TRUE, table=TRUE, pad=FALSE, ...)

Arguments

Value

table_options() and booktabs() return the previous settings. htmloptions() returns a list of settings without changing the defaults.

Details

The table_options() function sets a number of options that control formatting. Currently the options that affect both LaTeX and HTML output are: [object Object],[object Object],[object Object] These options are only used for LaTeX output: [object Object],[object Object],[object Object],[object Object] These options are only used for HTML output: [object Object],[object Object],[object Object],[object Object],[object Object] These may be set persistently by calling table_options(), or just for the duration of the call by passing them in a list via latex(options=list( ... )). Additional ... arguments to latex are passed to format. The booktabs() function sets the table_options() values to different defaults, suitable for use with the booktabs LaTeX package. The htmloptions() function constructs a list suitable for the options argument to html.tabular, with grouping of options that rarely differ from each other. Note that any LaTeX code can be used in the rule options; for example, see the longtable example in the vignette. Material to go above the headers goes into toprule, material between the headers and the body goes into midrule, and material at the bottom of the table goes into bottomrule.

See Also

latex.tabular, html.tabular

Examples

Run this code
tab <- tabular( (Species + 1) ~ (n=1) + Format(digits=2)*
         (Sepal.Length + Sepal.Width)*(mean + sd), data=iris )
latex(tab)
save <- booktabs()
latex(tab)
table_options(save)

Run the code above in your browser using DataLab