Introduction

The following exercises are part of the Rcompadre and Rage package vignettes. Since the GitHub pages for the Rcompadre and Rage packages are updated separately from this website, this page will include a brief summary of each exercise instead of the full text and code.

Links for each page are included in the summaries below.


Getting started with Rcompadre

GitHub page with code here.

This broad introduction to the Rcompadre package covers the following items:

  1. Downloading the COMPADRE and COMADRE databases and loading them into R
  2. Exploring the data (variable names, summary plots, etc.)
  3. Searching for species in the databases
  4. Accessing the matrix population models
  5. Subsetting the databases
  6. Potential issues with MPMs
  7. Making calculations from matrices

Using Rcompadre with the tidyverse

GitHub page with code here.

The "tidyverse" is a popular group of R packages geared toward data analysis, including dplyr (a grammar of data manipulation) and ggplot2 (a grammar of graphics). This exercise covers manipulation of the databases using packages within the tidyverse.


Vectorizing with Rcompadre

GitHub page with code here.

Vectorized code generally runs faster than loops, and many R users find that vectorized code is easier to write and understand. This exercise covers the process of vectorizing data in the COMPADRE and COMADRE databases.


Getting started with Rage

GitHub page with code here.

This broad introduction to the Rage package covers the following items:

  1. Loading example MPM data
  2. Examining life history traits
  3. Life table functions and quasi-stationary distribution
  4. Standardizing vital rates
  5. Conducting perturbation analyses
  6. Transforming MPMs

 


Deriving vital rates from an MPM

GitHub page with code here.

This exercise demonstrates how to derive various vital rate components from post-breeding census MPMs (e.g., growth, shrinkage, stasis, dormancy, fecundity, and clonality). 


Deriving life history traits from an MPM

GitHub page with code here.

This exercise provides an overview of Rage package functions used to estimate life history traits from MPMs. These functions follow methods from Caswell (2001) and Morris & Doak (2003). 


Age-from-stage analyses

GitHub page with code here.

This exercise demonstrates how to obtain age-specific schedules of survivorship and reproduction from MPMs regardless of whether the stage classes are based on age, size, and/or ontogeny.


Ternary plots

GitHub page with code here.

This exercise demonstrates how to produce ternary plots (Silvertown & Franco 1993) with population growth rate as the "fourth" dimension.