# Package Distance

The R package Distance provides a simple interface for performing distance sampling analyses in the R statistical computing environment. Fitting detection functions and estimating abundance via Horvitz-Thompson estimators is supported (but the package lacks the design capabilities of Distance for Windows).

# Getting started

## Installing Distance

To obtain the Distance package, one can install via CRAN using the following code in R:

  install.packages("Distance")


Due to the CRAN release schedule, sometimes the version of Distance available on CRAN may be old, so one can always get the latest version using devtools, first installing devtools:

  install.packages("devtools")


then loading it and installing the latest version of Distance:

  library(devtools)
install_github("Distance","DistanceDevelopment")


The package should now be available for use.

## Simple example analysis

We provide a vignette to show various example analyses, demonstrating the capabilities of the package.

Note that the PDF displays the version of Distance that was used to run the analyses. If you have problems with running the analyses, check that you are using the same version of Distance. If the version reported in the PDF is older than yours, please let us know!