Geiger activities
Table of contents
- Expected learning outcomes
- Getting started
- Activity 1 (Feb 4): R Introduction
- Activity 2 (Feb 4): Using trees
- Activity 3 (Feb 4): Fitting models with geiger
Expected learning outcomes
The activities on this webpage will give you an overview of the scripting environment R, including tree manipulation with the R package Ape, and model fitting with the R package Geiger.
Getting started
All R activities can be run either on your own machine or on the Amazon Machine Image (AMI). If you have R installed on your computer, we recommend that you use your installation, if not, you could try to install it before starting the exercise, or use the AMI. If using the AMI, please log in to it with ssh or PuTTY and then type the following command:
sudo apt-get build-dep r-cran-rgl
(you may have to confirm with ‘y’)
Do the same for
sudo apt-get install libcurl4-openssl-dev
If using the AMI, make a directory for all R activities and and move into this directory:
mkdir wme_jan2015/activities/R
cd wme_jan2015/activities/R
Next, please download the following input files for this exercise, either to your own machine by double-clicking, or to the AMI with the wget command as given below.
- Tree file 1: anolis.tre
If using the AMI, download it withwget https://raw.githubusercontent.com/mwpennell/traitmodels-wme/master/R/datasets/anolis.tre
- Trait file 1: anolis.csv
If using the AMI, download it withwget https://raw.githubusercontent.com/mwpennell/traitmodels-wme/master/R/datasets/anolis.csv
- Tree file 2: cyprinodon.tre
If using the AMI, download it withwget https://raw.githubusercontent.com/mwpennell/traitmodels-wme/master/R/datasets/cyprinodon.tre
- Trait file 2: cyprinodon.csv
If using the AMI, download it withwget https://raw.githubusercontent.com/mwpennell/traitmodels-wme/master/R/datasets/cyprinodon.csv
You should now be set up for the R activities. Please type
R
to start the interactive R console and then follow the instructions given for each individual exercise in the linked .md files below. Please note that throughout these exercises you will have to adjust the specified paths for input files (e.g. “datasets/cyprinodon.tre”) according to where you’ve saved these files.
Activity 1 (Feb 4): R Introduction
- Tutorial: intro.md
- Script: intro.R
You can download this script from the course website to your AMI withwget https://raw.githubusercontent.com/mwpennell/traitmodels-wme/master/R/intro.R
Activity 2 (Feb 4): Using trees
Note that the plotting funtions described in the second part of this tutorial may not be available if you’re using the R installation on the AMI.
- Tutorial: using-trees.md
- Script: using-trees.R
You can download this script from the course website to your AMI withwget https://raw.githubusercontent.com/mwpennell/traitmodels-wme/master/R/using-trees.R”>using-trees.R
Activity 3 (Feb 4): Fitting models with geiger
- Tutorial: fitting-models-geiger.md
- Script: fitting-models-geiger.R
You can download this script from the course website to your AMI withwget https://raw.githubusercontent.com/mwpennell/traitmodels-wme/master/R/fitting-models-geiger.R