Please make sure you have the latest version of R (3.4.4) installed from CRAN.

The RStudio interface is strongly recommended; you can download it here (get the free Desktop version).

Install primary GLMM-fitting packages (and a variety of extras):

get_INLA <- FALSE
## modeling packages
mod_pkgs <- c("bbmle", "blme", "brglm", "brms", "gamm4",
              "glmmLasso", "glmmML", 
              "glmmTMB", "lme4", "MCMCglmm", "pscl", "robustlmm", "spaMM")
## miscellaneous/data manipulation
data_pkgs <- c("benchmark", "carData",
               "devtools", "emdbook",
               "mlmRev","MEMSS", "plyr",
               "reshape2", "SASmixed", 
               "tidyverse")
## model diagnostics/processing
diag_pkgs <- c("afex", "agridat", "AICcmodavg", "aods3", "arm", "broom",
               "cAIC4", "car", "coda", "DHARMa", "effects", "emmeans",
               "HLMdiag", "Hmisc", "lmerTest", "multcomp", "pbkrtest",
               "RLRsim", "rockchalk", "stargazer", 
               "texreg")
## graphics
graph_pkgs <- c("dotwhisker","ggplot2","ggstance","GGally","cowplot",
                "gridExtra","plotrix","dotwhisker","plotMCMC")
all_pkgs <- c(mod_pkgs,data_pkgs,diag_pkgs,graph_pkgs)
## list of available packages on repository
avail_pkgs <- rownames(available.packages())
miss_pkgs <- setdiff(all_pkgs,avail_pkgs)
if (length(miss_pkgs)>0) {
    stop("some packages not available??",miss_pkgs)
}
already_installed <- rownames(installed.packages())
## don't re-install if already installed
to_install <- setdiff(all_pkgs,already_installed)
if (length(to_install)==0) {
    cat("all done\n")
} else {
    install.packages(to_install,dependencies=TRUE)
}
## update everything ...
update.packages(ask=FALSE)
if (!"broom.mixed" %in% already_installed) {
    devtools::install_github("bbolker/broom.mixed")
}
## get INLA (optional!)
if (get_INLA) {
    source("http://www.math.ntnu.no/inla/givemeINLA.R")
}

There is no need to (re)install packages such as grid, nlme, MASS, mgcv, as they come with a standard R installation.

Last updated: 2018-04-20 12:19:06