How to do it...

Making base R objects tidy can be done using the following steps:

  1. Tidy an lm object:
library(broom)
model <- lm(mpg ~ cyl + qsec, data = mtcars)
tidy(model)
augment(model)
glance(model)
  1. Tidy a t_test object:
t_test_result <- t.test(x = rnorm(20), y = rnorm(20) )
tidy(t_test_result)
  1. Tidy an ANOVA object:
anova_result <- aov(Petal.Length ~ Species, data = iris)
tidy(anova_result)
post_hoc <- TukeyHSD(anova_result)
tidy(post_hoc)
  1. Tidy a Bioconductor ExpressionSet object:
library(biobroom)
library(Biobase)
load(file.path(getwd(), "datasets", "ch1", "modencodefly_eset.RData") )
tidy(modencodefly.eset, addPheno = TRUE)
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.226.180.133