tidy_stats.emmGrid: Create a tidy stats data frame from an emmGrid object

Description Usage Arguments Examples

View source: R/tidy_stats.emmGrid.R

Description

tidy_stats.emmGrid takes an emmGrid object and converts the object to a tidy stats data frame.

Usage

1
2
## S3 method for class 'emmGrid'
tidy_stats(model, args = NULL)

Arguments

model

Output of emmeans's emmeans without pairwise comparisons.

args

Unused.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
if(!requireNamespace("emmeans", quietly = TRUE)) {

  message(paste0("Package 'emmeans' is needed for this example to work. ",
                 "Please install it."), .call = FALSE) 
} else {

  # Load data
  pigs <- emmeans::pigs
 
  # Conduct a linear regression
  pigs.lm1 <- lm(log(conc) ~ source + factor(percent), data = pigs)
 
  # Tidy stats
  tidy_stats(pigs.lm1)
}

WillemSleegers/tidystats-v0.3 documentation built on Aug. 12, 2019, 5:31 p.m.