install.packages(c("tidyverse", "ggthemes", "patchwork"))Instructions for R Workshops @ UQ 2026
Dear Participants,
We are looking forward to seeing you at the UQ R Workshops. All workshops will be held on the St Lucia Campus at the locations below. Note that we are in the same room all week, except for Tuesday when we are in a nearby building.
| Day | Location |
|---|---|
| Monday | Room 241, Sir James Foots (Building 47A) |
| Tuesday | Room S201, Hawken Enginerring (Building 50) |
| Wednesday | Room 241, Sir James Foots (Building 47A) |
| Thursday | Room 241, Sir James Foots (Building 47A) |
| Friday | Room 241, Sir James Foots (Building 47A) |
The Workshop will run from 9-4 pm – please arrive at least 10 minutes early so that we can start on time and help with any last-minute installation issues (teachers will be available to help from 8.30 am). We will have a 15 minute Morning/Afternoon Tea break and Lunch will be from 12:30-1:30 pm.
There are lots of places to eat on campus, only a short walk from our rooms. Alternatively you may like to bring your lunch and spend you time sitting by the nearby UQ Lakes.
PLEASE READ CAREFULLY In order to take full advantage of the workshop, you will need to have a laptop, have the ability to connect to a public wifi network (details below), have a recent version of R and RStudio installed on your machine, have successfully installed all the required packages (see below). If you are using a work/company laptop where access is restricted, please double check these conditions with your IT department.
Please come back here regularly before the workshop. If there are any changes we will put them here and highlight them.
1. Laptops
Bring a laptop, if at all possible. Otherwise, you will need to work in pairs (which is fun too!). You will need to have install permissions on your laptop to install the software and packages below. If you don’t, ask get your IT support to help.
2. Installing R
It is straightforward to install R on your machine. Please try and have the latest version (currently R 4.5.2) but at least version 4.4. If you already have R installed, please check that you have at least R version >= 4.4 by running version in the console. If you don’t have version >= 4.4, please update. Version 4.4 was released in April 2024.
Follow these steps:
- Go to the CRAN (Comprehensive R Archive Network) R website. If you type ‘r’ into Google it is the first entry, then choose CRAN under Download, Packages on the left hand side, and then choose a mirror site in Australia.
- Choose to download R for Linux, Mac or Windows.
- For Windows users, just install ‘base’ and this will link you to the download file.
- For Mac users, choose the version relevant to your Operating System.
- If you are a Linux user, you know what to do!
3. Installing RStudio
We will use RStudio in this Workshop, a free front-end to R for Windows, Mac or Linux (i.e., R is working in the background). It makes working with R easier, more productive, and organised, especially for new users. There are other front-ends, but RStudio is the most popular. Please try and have the latest version (currently Version: 2026.01) but anything from 2024 onwards should be fine. You can check your version by going to the menu “Help” –> “Check for Updates”.
Go to the RStudio website and choose Install RStudio. It should autodetect your machine type, but if it doesn’t, you can choose the download for the machine type you have down the bottom of the page.
4. Installing the packages needed for the Workshop
Depending on what day you attend, there will be different package requirements. Please carefully read the instructions below and run the code corresponding to the day(s) of the workshop you are attending.
In RStudio, go to the Console. This should be bottom left window, with the command line indicated by “>”. Paste in the following code and hit Return.
Day 1 (Monday 10th February): Introduction to R and the tidyverse
Also update all previously installed packages as outlined below.
Day 2 (Tuesday 11th February): Linear modelling
install.packages(c("tidyverse", "GGally", "marginaleffects", "MASSExtra", "boot", "gglm", "MuMIn", "DHARMa", "car"))Also update all previously installed packages as outlined below.
Day 3 (Wednesday 12th February): Mixed Modelling
install.packages(c("tidyverse", "ADER", "glmmTMB", "DHARMa", "marginaleffects", "MuMIn", "mgcv", "patchwork", "gratia", "gglm", "car", "mgcViz"))NOTE: On Monday 2nd February we updated this list to include mgcViz. Please ensure you also install mgcViz.
Also update all previously installed packages as outlined below.
Day 4 (Thursday 13th February): Spatial modelling with temporal and spatial autocorrelation
install.packages(c("tidyverse", "sf", "terra", "patchwork", "mgcv", "spdep", "lmtest", "rnaturalearth", "rnaturalearthdata", "car", "glmmTMB", "sdmTMB", "gstat", "spdep", "DHARMa", "performance", "modelbased", "inlabru", "mgcViz"))NOTE: On Monday 2nd February we updated this list to include mgcViz. Please ensure you also install mgcViz.
Also update all previously installed packages as outlined below.
Day 5 (Friday 14th February): Multivariate statistics
install.packages(c("tidyverse", "vegan", "RgoogleMaps", "ggordiplots", "metR", "labdsv", "GGally", "factoextra", "dendextend", "patchwork", "gllvm", "corrplot", "gclus", "TMB", "mvabund"))NOTE: On Monday 2nd February we updated this list to include mvabund. Please ensure you also install mvabund.
Also update all previously installed packages as outlined below.
All Days
After running the install.packages function, look at the log it produces – everything should say it installed OK (if asked whether to install from source, just hit “n”). If you have installation problems, please contact us and we will try and help you (include all relevant error messages).
Once you have successfully installed all the required packages for your days, we need to ensure all your other packages are up to date. This is really important as the functionality of all packages changes and we have written the code for this workshop using the latest version of R, RStudio and installed packages.
First, restart R. You can do this from within RStudio through the menus (Session –> Restart R). Second, ensure everything is up to date by running the following code.
update.packages(ask = FALSE)5. Connecting to WiFi
Your experience at the workshop will be greatly enhanced (and in some cases required) if you can access the internet. There are a range of options available, but if your laptop is centrally managed by your employer, please check with your IT department before attending the workshop.
- For UQ Staff/Students you can access the WiFi as you normally would on campus.
- For other university/research affiliated staff/students, eduroam will be available. It is essential that you test the connection on your home campus, if you haven’t used it before. Your home institution should have specific instructions for connection.
- For everyone else, UQ runs a Guest WiFi network. You can connect to the network by signing in with your Apple, Google or LinkedIn accounts. You can access further information here.
- Alternatively you can hotspot with your phone.
If you have and questions or concerns, please don’t hesitate to reach out to us.
We look forward to seeing you there!
Regards
Ant, Dave and Jase