EDUCE
  • About
  • educer package
    • Tutorials
  • Setup instructions
    • Updating your operating system
    • R and RStudio
    • educer package
    • Working on a server
    • bash
    • Miniconda
    • QIIME 2
    • VPN
    • Courses
      • MICB 322
    • Workshops
      • Introduction to R and RStudio
      • Introduction to the R tidyverse
      • Reproducible research
      • Intermediate R programming
      • Statistical models in R
      • Creating web apps in R with Shiny
      • Amplicon sequence analysis
  • Videos
    • Installation instructions
    • Introduction to command line
  • Course Compiler
    • About
    • Course outline
    • Example data
    • Shiny app
  • Data Manipulator
    • About
    • Normalization methods
    • Shiny app

Statistical models in R

Workshop setup instructions

  • Make sure that you have installed the latest versions of R and RStudio.

  • In RStudio, install the educer package. This will install all of the tidyverse packages and other resources.

  • Install all other packages we will use during the workshop by copying the following code into the Console, after the prompt >

    # Data manipulation and visualization
    if (!require(tidyverse)) install.packages("tidyverse")
    
    # Data sets
    if (!require(faraway)) install.packages("faraway")
    if (!require(gapminder)) install.packages("gapminder")
    if (!require(datasets)) install.packages("datasets")
    if (!require(HSAUR3)) install.packages("HSAUR3")
    
    # Mixed-effects and generalized linear models
    if (!require(MASS)) install.packages("MASS")
    if (!require(lme4)) install.packages("lme4")
    
    # ANOVA for model objects
    if (!require(car)) install.packages("car")
    
    # Compare predicted values across groups
    if (!require(lsmeans)) install.packages("lsmeans")