
Tidy version of the anova object into a flextable object
Source:R/tabularise.anova.R
tabularise_tidy.anova.Rd
Tidy version of the anova object into a flextable object
Usage
# S3 method for anova
tabularise_tidy(
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 isFALSE
if a table caption is detected (tbl-cap
YAML entry).- auto.labs
If
TRUE
(by default), use labels (and units) fromorigdata=
.- origdata
The original data set used for the ANOVA (used for changing the labels). By default, it is
NULL
.- labs
Labels to use to change the names of elements in the
term
column. By default, it isNULL
.- lang
The natural language to use. The default value can be 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 fromgetOption("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$tidy(iris_anova)
Analysis of variance
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