Pages (Desktop)

Pages (Mobile)

A listing of all the guides I have written on this blog can be found here. Jump to:


R Guides

Introductory

Getting Started with R: Introduction to R - Part 1: An introduction to R, what is R, where to get R, how to get started using R, a look at objects and functions, an overview of data structures, and getting started with manipulating data.

Getting Started with R: Importing data into R - Part 2: This guide shows you how to import your existing data into R from .csv or Excel files.

Getting Started with R: An overview of graphics in R - Part 3: This guide gives you an overview of some of the graphical capabilities of base R to produce high quality plots.

Graphics

A quick guide to pch symbols - A quick guide to the different pch symbols which are available in R, and how to use them.

A quick guide to line types (lty) - A quick guide to the different line types available in R, and how to use them.

Creating multi-panel plots and figures using layout() - This quick guide shows you how to use the layout() function in R to create multi-panel plots and figures.

Quick guide to annotating plots in R - A guide to show you how to annotate plots in R, including text annotation.

Statistics

Adding error bars - How to add error bars to your plots.

Principal components analysis (PCA) - How to do principal components analysis, and how to create beautiful looking biplots using R's base functions.

Principal components analysis (PCA) - Part 2 - The follow up guide that shows you how to create loadings plots, add convex hulls, and more biplot customisations.

Programming

Introduction to loops in R - This guide explains how to write loops in R to automate and repeat code, and gives an overview of vectorized functions.

Nested loops - This guide explains how to write loops within a loop - a nested loop.

GIS / Mapping

Creating simple location maps in R - This guide shows you how to create a simple location map in R. Including an "overview" map and a "study area" map. No GIS skills needed!

DEMs and where to find them - A look at different freely available Digital Elevation Models (DEMs), where to get the data and how to use them in R.

Bathymetric maps in R: Getting and plotting data - Part 1 of a guide showing how and where to get bathymetry data and how to import it into R.

Bathymetric maps in R: Colour palettes and break points - Part 2 of the bathymetry guide, taking an in-depth look at colour schemes for raster plots.

Climate Data

Getting Climate Data - This guide will take you through the steps to download and extract climate data from CRU for your project.

Working with extracted CRU climate data - This guide will show you how to work with your downloaded CRU climate data, perform analysis and make climate plots.

Extracting WorldClim climate data - This guide will show you how to download and extract climate data from WorldClim datasets. It will also tell you how to create great looking climate maps, of anywhere in the world.

Working with RasterStack objects and WorldClim Data - This guide follows on from the previous guide, and shows you how to work with RasterStack objects (instead of RasterLayers). This is useful when you are dealing with lots of separate data files. It also shows you some additional ways to manipulate and plot the data.

Sources of climate data - This quick guide shows you where to find climate datasets, and raw climate station data.

Walter and Lieth climate diagrams in R - This guide explains what a Walter and Lieth climate diagram is, and how to create one in R.

Interpolated gridded datasets in R: UV-B data - This guide shows you how to interpolate gridded datasets using bilinear interpolation. This example uses UV-B data, but can easily be adapted to use other gridded datasets, such as CRU climate data.

Pollen Diagrams

Pollen diagrams using rioja - Part 1 - In the first part of this guide, I show you how to plot pollen diagrams using rioja.

Pollen diagrams using rioja - Part 2 - In the second part of this guide, I show you some additional options, and some "hacks" for plotting pollen diagrams.

Pollen diagrams using rioja - Part 3 - In the third part of this guide, I show you how to combine different plot styles on the same pollen diagram.

Miscellaneous

Useful functions for manipulating text in R - This guide shows you some useful functions for text manipulation, including abbreviating text, trimming text, and adding to text.