Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

knit_print.tabular

Custom printing of tabular objects.


Description

Automatically print tabular objects with formatting when in a knitr document.

Usage

## S3 method for class 'tabular'
knit_print(x, format = getKnitrFormat(), ...)

Arguments

x

A tabular object.

format

Which output format? "latex" and "html" are supported.

...

Other parameters, currently ignored.

Details

This function is not normally called by a user. It is designed to be called by knitr while processing a ‘.Rmd’ or ‘.Rnw’ document.

If table_options()$knit_print is TRUE and the output format is supported, this method will prepare output suitable for formatted printing in a knitr document using asis_output. Otherwise, the usual unformatted print display will be done by normal_print.

Value

An object marked for printing in a knitr document.

Examples

tab <- tabular( (Species + 1) ~ (n=1) + Format(digits=2)*
         (Sepal.Length + Sepal.Width)*(mean + sd), data=iris )
knitr::knit_print(tab)

tables

Formula-Driven Table Generation

v0.9.6
GPL-2
Authors
Duncan Murdoch
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.