Learn R Programming

broom (version 0.3.4)

anova_tidiers: Tidying methods for anova and AOV objects

Description

Tidies the result of an analysis of variance into an ANOVA table. Only a tidy method is provided, not an augment or glance method.

Usage

## S3 method for class 'anova':
tidy(x, ...)

## S3 method for class 'aov': tidy(x, ...)

Arguments

x
An object of class "anova" or "aov"
...
extra arguments (not used)

Value

  • A data.frame with columns
  • termTerm within the model, or "Residuals"
  • dfDegrees of freedom used by this term in the model
  • sumsqSum of squares explained by this term
  • meansqMean of sum of squares among degrees of freedom
  • statisticF statistic
  • p.valueP-value from F test

Examples

Run this code
a <- anova(lm(mpg ~ wt + qsec + disp, mtcars))
tidy(a)

a <- aov(mpg ~ wt + qsec + disp, mtcars)
tidy(a)

Run the code above in your browser using DataLab