## Distance R packages

Many of the components of the Distance Windows package are in fact R packages which can be used independently of Distance itself. These pages have resources for using the packages, including vignettes showing example analyses.

You can download R from the R project website (download page).

### 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” 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 Horvitz-Thompson-type estimators. CRAN github wiki**Distance**- a simpler interface to mrds for single observer distance sampling surveys. CRAN github wiki**dsm**- fits density surface models to spatially-referenced distance sampling data. Count data are corrected using detection function models fitted using mrds or Distance. Spatial models are constructed using generalized additive models. CRAN github wiki**DSsim**- a package for simulating distance sampling surveys. 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 preprint (revised November 2017) for getting started with `Distance`

analyses. The following vignettes show example analyses. Examples were generated from the `.Rmd`

files (not sure what `.Rmd`

files are? click here for a quick quide to RMarkdown), data files are also supplied so you can duplicate the analyses (if they are not included in packages).

- Simple detection function analysis of duck nests (.Rmd, data)
- Stratified study region for minke whales in the Southern Ocean (.Rmd, data)
- Multiple covariate detection function (MCDS) analysis of crabeater seals (.Rmd, data)
- Double observer (MRDS) analysis of crabeater seals (.Rmd, data)
- Double observer (MRDS) analysis of golf tees (.Rmd)
- Density surface model (DSM) analysis of pantropical spotted dolphins (.Rmd)
- Density surface model (DSM) analysis of point count data for hares (.Rmd) Requires version 2.2.0 of mrds

### 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).