
In attachment: a few examples of the figures that you will learn to produce as part of the data visualisation sections of this course.
Download all the scripts and datasets used throughout the course from here, or download them one by one from each lecture.
Capture the result of a function like log(3) by assigning it to a named object such as log_three, then retrieve it to perform further operations.
Create and save your first R script, add comments with hashtags to document functions, then build a numeric vector with c(), and apply log to compute logarithms for multiple values.
Learn to create your first scatter plot in R with input as X and output as Y using plot, and rerun the code after restarting to fix input not found.
Learn how to save figures on a Windows machine by running a script, adjusting the interface for readability, and saving the figure as a JPEG on the desktop.
Show housekeeping the R workspace on a Mac: use airless to list and remove objects, and set and verify the work directory with GetWD and setWD, plus Windows notes.
Learn how to set the working directory in R on Windows by using file.choose, replacing backslashes with forward slashes, and calling setwd to update.
Explore comparing two groups with t.test by entering data as two vectors, visualize histograms, and choose between Student's and Welch's t-tests based on variance equality, interpreting p-values under 0.05.
Learn to compare two groups in a CSV file with R: load data, convert species to a factor, visualize body weight with a box plot, and perform a two-sample t-test.
Explore lm() for fitting and testing linear models, compare predictor model to a null model with anova and f tests, and use diagnostic plots to check independence, normality, and homoscedasticity.
Explore how body weight differs across six species using a one way ANOVA in R, including data preparation, factor conversion, and boxplot visualization.
Perform post-hoc comparisons in R using pairwise t tests with Bonferroni adjustment, interpret the pairwise results, and save contrast outputs with the MMeans package.
Perform a regression in R to test whether algal length depends on water depth, using diagnostic plots and F-test to verify assumptions, reporting a slope of 0.78 cm per meter.
Identify common issues in linear regression using diagnostic plots, including heteroscedasticity, nonlinearity, and outliers, and interpret residuals, leverage, and Cook's distance; consider polynomial terms or nonlinear or generalized linear models.
Learn to fit and compare multi-predictor models in R, including interactive and additive effects of species identity and water depth, use diagnostics, information criteria, and plotting to interpret results.
This course is aimed at those that already have a theoretical understanding of statistical concepts and want to learn the practical side of data analysis.
Learning how to analyse data can be a daunting test. Applying the statistical knowledge learned from books to real-world scenarios can be challenging, and it's often made harder by seemingly complicated data analysis softwares.
This course will help you to develop a reliable data analysis pipeline, creating a solid basis that will make it easy for you to further your data analysis skills throughout your career.
We will use R, a free, state-of-the-art software environment for modelling, data handling, data analysis, and data visualisation.
We will start from installing R and taking baby steps to become familiar with the R programming language. We will then learn how to load data in R, how to visualise them with publication-level quality graphs, and how to analyse them.
I will provide you with the scripts that I use throughout the course, so that you can easily use them and adapt them to your own research objectives.
We will learn R one small step at a time, starting from absolute zero:
· how to enter data in R
· how to visualise data using function plot() and package ggplot2
· how to fit, interpret, and evaluate general linear models for a variety of study designs, including t test, ANOVA, regression, ANCOVA, and multiple regression scenarios
· how to fit polynomial regression
· an introduction to user-defined non-linear models
· an introduction to generalised linear models for non-normally distributed data (case study: count data)
· optimal data organisation and "data wrangling" - merging, subsetting, and summarising data