Distance R packages
We have created a suite of R packages that allow design, analysis and simulation of distance sampling data. Some of these packages are used in the Distance for Windows software, but you can also access them directly from R. This page links to resources for downloading and using the distance sampling R packages, including vignettes showing example analyses.
You can download R from the R project website.
Available packages
A list of available packages is given below. Links to “CRAN” are stable versions of the package, uploaded to the Comprehensive R Archive Network, “github” links are to development versions and are recommended for advanced users only, “wiki” and “readme” links are to online additional documentation.

mrds
 fits detection functions to point and line transect distance sampling survey data (for both single and double observer surveys). Abundance can be estimated using HorvitzThompsontype estimators. CRAN, github. 
Distance
 a simpler interface tomrds
for single observer distance sampling surveys. CRAN, github, wiki, feature comparison. 
dsm
 fits density surface models to spatiallyreferenced distance sampling data. Count data are corrected using detection function models fitted usingmrds
orDistance
. Spatial models are constructed using generalized additive models. CRAN, github, wiki. 
dsmextra
 a toolkit for quantifying and visualising extrapolation in density surface models. github, readme. 
dsims
 a package for simulating distance sampling surveys (this new package replaces the now retired DSsim, this vignette gives an example of the small changes required to convert to the new syntax). CRAN, github. 
mads
 deals with unidentified sightings, covariate uncertainty and model uncertainty in Distance sampling. CRAN, github.
Getting started
Wondering how to get started with the distance sampling R packages? We recommend our paper in the Journal of Statistical Software for getting started with Distance
analyses.
We also have a page dedicated to example analyses. Examples were generated from the .Rmd
files . Data files are also supplied so you can duplicate the analyses (if they are not included in packages). The examples site referenced above contains many of the vignettes formerly shown on this page, plus many more examples.
Migrating data and analyses from Distance for Windows
to R
environment
Analysis of distance sampling data can be performed either in the Distance for Windows
graphical user interface, or with the R
packages described on this page. An R
package, readdst
is under development for reading Distance for Windows
project files into R
for subsequent analysis in R
. The package was written as a testing tool to compare results produced by the R
routines against results produced by Distance for Windows
. However, as we demonstrate in the following vignette, readdst
can be used to migrate some Distance for Windows
projects for analysis in R
(limitations of readdst
are shown in the vignette).