Skip to main content

Trinity College Dublin, The University of Dublin

Trinity Menu Trinity Search



You are here Research > Research Groups > The Jackson Lab > Projects

R podcast course

A course in the R statistical computing language by video podcast

I have been playing around with teaching R through downloadable video podcasts and feel that it works well for getting people up to speed with some of the basics in a user-friendly way. I have also decided to stick with the open-source ethos for R and provide these to all users who want access under CC BY-NC-SA 4.0 license. As is the case with all programming languages, there is always more than one way to do something, and these represent my own personal preference for a variety of analyses (at least in terms of teaching others how to do them). The newer podcasts have been built using Mac, whereas the older podcasts illustrate the use of R using windows. You may need to learn some conversions for some commands that differ, but the Rstudio front-end makes it much the same experience regardless of operating system. The course is ever expanding, and I will be adding new chapters as time goes on. If there is an analysis you would particularly like to see, I might be able to create a podcast so please contact me with your suggestions and requests (a.jackson(at)tcd.ie).

You will of course need to install R before you can follow along with the podcast course, and I recommend very much installing the more user friendly front-end interface Rstudio desktop open source version (also free). There are also some script template files and datafiles (I suggest you right click and save these to your local disk) to accompany some of the podcasts below. Many browsers will play these files in a frame, but I strongly suggest you download each podcast to enjoy at your convenience in your media player of choice (Quicktime is often a default, or VLC player) to avoid problems such as stutter or lack of content.

Note that as of September 2017, I am in the process of updating and replacing all my older podcasts to use Rstudio and avoid some previous bad habits I picked up and passed on (like using the attach() function). I have left the old series up here towards the end of this page for now as it is more complete. I have also been helped out greatly by Prof Alen Dzidic who spent a sabbatical with me and we rewrote all the example script files as nice new Rmarkdown files (which I also explain in a new podcast). The accompanying scripts are linked to here as html pages on remote connections. You can download both the raw code used to generate these html files, and the rendered html themselves by either cloning or downloading our development site from GitHub. This way, you can have access to all the files (and they are not large) and you can work on them locally in Rstudio or your internet browser without an internet connection. These files are very much in development, and so you would be advised to download a new copy or set of them every few months or so. If you set up your own GitHub account you could follow this specfic project and get notifications about updates automatically. You might even want to contribute some code or report some bugs!

The New Podcast Series

The new podcast series is available from YouTube and where there is an accompanying Rmarkdown script in the GitHub project, it is referenced in the video description of each podcast. Remember, the entire set of script files can be downloaded from the GitHub development site. Some of the tutorials do not yet have podcasts made as I am prioritising the main ones for now.


The Old Podcast Series

Introduction to R for first time users

  1. Opening R for the first time: podcast
  2. Working with script files: podcast, script
  3. Importing data into R: podcast, script, data
  4. Installing packages: podcast

Basic graphics / plots in R

  1. Histograms: podcast, script
  2. Scatter plots (including how to make pretty graphs): podcast, script
  3. Barplots: podcast coming soon, script
  4. Errorbar plots: podcast coming soon, script
  5. Boxplots: podcast, script
  6. Advanced Boxplots: podcast, script

Basic analyses in R

  1. Generating summary statistics (includes an introduction to writing your own functions): podcast, script
  2. Basic data manipulation (sort, subset, randomise, sample, etc...): coming soon.
  3. Comparing two means with t-tests and their non-parametric analogues: podcast, script, data

Analysis of Variance - ANOVA in R

  1. ANOVA one-way: (podcast coming soon), script, data

General linear models in R

  1. Simple linear regression: podcast, script, data
  2. Analysis of Covariance (ANCOVA - fixed and linear effects in general linear models): podcast, script, data
  3. Multiple regression and model selection using AIC: coming soon
  4. Mixed effects / multilevel / hierarchical regression models: coming soon

Generalised linear models in R (non-normal errors)

  1. Poisson regression: coming soon
  2. Binary logistic regression: podcast, script, data
  3. Binomial regression for proportional data: coming soon
  4. Survival models for time-to-event

SIAR package podcasts


SIAR: Stable Isotope Analysis in R

SIAR is an R package that contains functions useful for analysing stable isotope data in the context of ecology - although there are more general applications. Its primary function is as a mixing model to estimate the diet of organisms from analysis of the isotopic content of their food sources. It fits the models via MCMC within a Bayesian framework. The following podcast series is supported by the demonstration files which can be obtained here. Equivalent podcasts supporting the SIBER models will follow shortly. These examples are based on the R package siar. These models are based on the paper Parnell, A.C., Inger R., Bearhop, S. & Jackson, A.L. 2010. Source partitioning using stable isotopes: coping with too much variation. PLoS ONE, 5(3), e9672. doi

  1. Importing data for analysis in siar: podcast
  2. Running siar and basic interrogation of results: podcast
  3. Matrix plots and posterior correlations: podcast
  4. Advanced interrogation of results

SIBER: Stable Isotope Bayesian Ellipses in R

N.B. support for SIBER functions have moved to their own package and those contained in SIAR are not longer supported. SIBER allows for analysis of analysis of data in isotope-space as opposed to diet-space such as in the mixing model side of siar. The following set of podcasts are currently out of date (as of March 2017) as they use the older interface. I am leaving them here as the concepts still hold. A similar set of analyses are available as vignettes within the new SIBER package. The SIBER functions and routines are based on the paper Jackson, A.L., Parnell, A.C., Inger R., & Bearhop, S. 2011. Comparing isotopic niche widths among and within communities: SIBER – Stable Isotope Bayesian Ellipses in R. Journal of Animal Ecology, 80, 595-602. doi

  1. Introduction to SIBER: comparisons among communities or among community members? podcast
  2. Using ellipses to compare community members: podcast