View on GitHub

Nunavut 2016

Course materials for my R workshop in Iqaluit, Nunavut, Canada on 6-9 August 2016

Download this project as a .zip file Download this project as a tar.gz file

Course Description

Participants in this four day course will learn how to use the R software to perform basic statistical analyses with common fisheries data and analytical techniques. Participants will learn how to customize R for their purposes, load and manipulate data, construct simple tabular and graphical summaries, and use linear and nonlinear models, including how to compare among groups. Within these statistical methods, participants will explore length and age frequencies, weight-length relationships, maturity-at-length relationships, growth models (length-at-age), catch curve mortality estimates, age-length keys, and population abundance estimates from mark-recapture data. Course content will follow the descriptions in the Introductory Fisheries Analyses with R book, though this book is not required for this course. Topics will be introduced with a short lecture and coding demonstration followed by a hands-on exercise that will largely use fisheries data from Nunavut.

The primary focus of this course is to teach the use of R. Thus, it will be assumed that participants have little to no experience with R, but a familiarity with basic to intermediate statistics (e.g., linear regression and ANOVA) and typical fisheries stock assessment methods.


Pre-Course Preparation

  1. Install at least version 3.3.0 of R on your laptop. Directions for a first install are here for Windows or here for MacOS. If you are using Windows and already have R installed, then here is an easy method to upgrade.
  2. I prefer to use RStudio to interact with R (but RStudio is not required for this course). Directions to install and prepare RStudio (along with a quick introduction to the RStudio interface) are here for Windows and here for MacOS.
  3. Install the FSA, FSAdata, AICcmodavg, car, dplyr, magrittr, multcomp, nlstools, nnet, plotrix, readr, and readxl packages. Directions for installing packages are here if you plan to use RStudio, or here for Windows and here for MacOS if you plan to use R directly.
  4. I will very briefly review basic statistics during the workshop. However, to be fully prepared for the workshop you may want to review some basic statistical principles. One way to do this is to review the following topics in McDonald's free Handbook of Biological Statistics, 3rd ed. book -- "Types of Biological Variables", "Basic Concepts of Hypothesis Testing","Descriptive Statistics", "Tests for One Measurement Variable" from "Independence" through "Kruskal-Wallis Test", "Regressions", and "Multiple Comparisons" under "Multiple Tests".
  5. Save to your computer at least the R scripts for the course (available individually below or collectively in this ZIP archive). We will make hard copies of the R handouts available to you at the workshop for taking notes on. If you so desire, all materials for the workshop shown below are available in this ZIP archive.

Course Materials

  1. Introduction to R and RStudio
  2. R Basics and Terminology
  3. R data.frames I -- Reading Data
  4. R data.frames II -- Basic Data Wrangling
  5. Basic Summaries and Plotting
  6. One-Way ANOVA -- Comparing Group Means
  7. Simple Linear Regression -- Weight-Length Relationship
  8. Dummy Variable Regression -- Weight Length Relationship
  9. Nonlinear Regression -- von Bertalanffy Growth Function
  10. Nonlinear Regression -- Compare VBGF Between Groups
  11. Mortality (Catch Curves)

Post-Course Follow-Up