Computational Set-up

Here are instructions for how check your R installation and install packages needed for the workshop.

Check software versions

Open R and run this code to check what version of R your system is running:

R.Version()

If the version printed is not 4.0 or newer, please upgrade R.

This step is not required if you do not use RStudio. Open RStudio and run this code to check what version of RStudio is installed on your system:

rstudioapi::versionInfo()

If the version printed is not 1.4 or newer, please upgrade Rstudio.

Install workshop packages

Open R and run this script:

package_list <- c("dplyr", "tidyr", "purrr",       # for standard data manipulation
                  "ggplot2", "desplot",            # for plotting
                  "nlme", "lme4", "emmeans",       # for linear modelling
                  "SpATS",                         # for fitting splines
                  "sp", "spdep", "gstat", "spaMM", "sf")    # for spatial modelling

install.packages(package_list)
sapply(package_list, require, character.only = TRUE)
Please note that the spatial packages may take awhile to install, and you may run into problems with the installation. Please attempt installation in advance of the workshop. The packages have all been successfully installed if after the sapply(package_list, require, character.only = TRUE) is run, the R output is “TRUE” for each package. If you have problems installing and/or loading any of these packages that you are not able to resolve, contact us so we can help you, preferably before the workshop.

Library Information

packageusage
dplyr, tidyr,standard data manipulation
purrrfor repeat functions
nlmemixed linear models with options for spatial covariates
lme4mixed linear models with crossed random effects
ggplot, desplotstandard plotting packge and extension for plotting block outlines
SpATSspline-fitting
sppreparation of spatial objects
spdepMoran’s I test
gstatfor fitting empirical variogram
spaMMfits Matern covariances structure for mixed linear models
emmeansextracts marginal means from linear model objects
Next