Practical exercises

Here you can find the exercises for the practical sessions during the course. All content is here and will remain here on the Distance website for future consultation.

Practicals

Practicals are provided in RMarkdown (.Rmd) format. RMarkdown can be opened in RStudio and the file “knitted” into HTML or PDF.

An HTML version of all practicals is provided here and is generated using using the bookdown package.

Note that the practicals are designed to be run sequentially, files generated from previous analyses are loaded and used in subsequent analyses.

Number Practical Description Rmd file Solutions
1 R tutorial Rmd Rmd
2 Straightforward distance samping Rmd  
3 Awkward data sets Rmd  
4 Simulation of distance sampling data Rmd  
5 Processing data Rmd  
6 Fitting detection functions Rmd Rmd
7 Fitting DSMs Rmd Rmd
8 Multiple term DSMs, model checking and selection Rmd Rmd
9 DSM Prediction Rmd Rmd
10 DSM Variance Rmd Rmd
11 mrds Rmd  
11 MRDS in Distance PDF Narrative

Data sets

Data for the practicals come in a variety of forms for analysis both in R and in Distance 7.

  • added 27Jul17 were workspace file and text file for Practical 1
    • also small change to Practical 11 loading the knitr package
  • added 26Jul17 were Distance 7 project for Practicals 5-10

Data for R tutorial (Practical 1)

Practical 1 depends upon an RData workspace and a simple text file. Download these two files and place in the same location as the 01-Rtutorial.Rmd file.

Data for distance sampling analysis refresher (Practical 2)

Ha, fooled you. Data for this practical will be simulated; therefore no datasets to download.

Data for challenging data sets (Practical 3)

Data for simulation (Practical 4)

Download this zip archive. You will find a folder (Distance simulation exercise) filled with material useful for the R version of Practical 4, and two archives containing Distance 7 projects (DSsimExercise and DSsimExerciseSolutions).

Data for density surface modelling (Practicals 5-10)

To run the sperm whale analysis you’ll need to download the following files, unzip them and store the unzipped folders in the same directory as the Rmd files for practicals 5-10 above:

The Distance 7 project containing these data can be downloaded from this location

We’d like to thank Jason Roberts of Duke University for preparing these files in ArcGIS with the MGET Toolbox.

Data for double platform analysis (Practical 11)

Download this zip archive. That contains three Distance 7 projects (GolfteesExercise, GolfteesSolutions and CrabbieMRDSExercise) as well as a datafile (comma delimited file) crabbieMRDS.csv for use with the R version of Practical 11.

If you just need the csv file try this: Crabeater seals MRDS

Problems

If you run into a problem running any of these examples, please report an issue on this GitHub repository. Or contact the workshop instructors.