loading...

Tidy version of the anova object into a flextable object

# S3 method for class 'anova'
tabularise_tidy(data, ...)

Arguments

data

An anova object

...

Additional arguments used tabularise_default.anova()

Value

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

Examples

is <- data.io::read("iris", package = "datasets")

is_lm1 <- lm(data = is, petal_length ~ species)

library(tabularise)

anova(is_lm1) |> tabularise_tidy()

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

# identical anova(is_lm1) |> tabularise$tidy()

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

# Use labels anova(is_lm1) |> tabularise$tidy(origdata = is)

Analysis of variance
Response: Length of the petals [cm]

Term

Df

Sum of squares

Mean squares

Fobs. value

p value

Iris species

2

437.1

218.551

1180

< 2·10-16

***

Residuals

147

27.2

0.185

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

# alternative with anova_() in {modelit} package anova_(is_lm1) |> tabularise$tidy()

Analysis of variance
Response: Length of the petals [cm]

Term

Df

Sum of squares

Mean squares

Fobs. value

p value

Iris species

2

437.1

218.551

1180

< 2·10-16

***

Residuals

147

27.2

0.185

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