Skip to contents
loading...

Create a rich-formatted table from an anova object

Usage

# S3 method for anova
tabularise_default(
  data,
  header = TRUE,
  title = header,
  auto.labs = TRUE,
  origdata = NULL,
  labs = NULL,
  lang = getOption("data.io_lang", "en"),
  show.signif.stars = getOption("show.signif.stars", TRUE),
  ...,
  kind = "ft",
  env = parent.frame()
)

Arguments

data

An anova object

header

If TRUE (by default), add a header to the table

title

If TRUE, add a title to the table header. Default to the same value than header, except outside of a chunk where it is FALSE if a table caption is detected (tbl-cap YAML entry).

auto.labs

If TRUE (by default), use labels (and units) automatically (from origdata=)

origdata

The original data set used for the ANOVA. By default it is NULL. Used to extract labels that are lost in the anova object.

labs

Labels to change the default names in the term column of the table. By default it is NULL and nothing is changed.

lang

The natural language to use. The default value is set with, e.g., options(data.io_lang = "fr") for French.

show.signif.stars

If TRUE, add the significance stars to the table. The default is taken from getOption("show.signif.stars").

...

Additional arguments (not used for now)

kind

The kind of table to produce: "tt" for tinytable, or "ft" for flextable (default).

env

The environment where to evaluate lazyeval expressions (not used for now)

Value

A flextable object you can print in different form or rearrange with the {flextable} functions.

Examples

iris_anova <- anova(lm(data = iris, Petal.Length ~ Species))
tabularise::tabularise(iris_anova)

Analysis of variance
Response: Petal.Length

Term

Df

Sum of squares

Mean squares

Fobs. value

p value

Species

2

437.1

218.551

1180

< 2·10-16

***

Residuals

147

27.2

0.185

0 <= '***' < 0.001 < '**' < 0.01 < '*' < 0.05