Rdistance analyzes line- and point-transect distance-sampling data.
If you are unfamiliar with distance-sampling, check out our primer,
Distance Sampling for the Average
Joe.
If you are ready to take on an analysis, the best place to start is the
Examples section (below). The Example sections of help files
?RdistDf, ?dfuncEstim, and ?abundEstim contain enough information
to get you started and explain a few details of analysis in
Rdistance. The Rdistance
wiki (always a
work-in-progress) contains additional information on distance sampling
and is the equivalent of vignettes.
- Line-transect and point-transects
- Likelihood functions:
- half-normal (
halfnorm) - hazard rate (
hazrate) - negative exponential (
negexp)
- half-normal (
- Expansion terms
- Standard methods:
print,plot,predict,AIC, etc. - Observation and transect-level distance function covariates
- Standard R formula model specification (e.g.,
distance ~ elevation + observer) - Measurement unit control and automatic conversion
- Automated bootstrap confidence intervals
- Overall (study area) and site level abundance estimates
- Help and wiki content taught at multiple workshops and reviewed by multiple authors
Rdistance depends on and imports a number of other packages. All
installations require compilation because some dependent packages
require compilation. Compilation requires either Rtools (on Windows
systems) or r-base-dev (on Linux systems). The number of dependencies
is large, in part because Rdistance imports dplyr, so a fresh
installation will require patience.
- Install
Rtools: Download the correctRtoolsinstaller for your version of R from here. When download completes, run the installer (double-click it) and accept all default options. IfRtoolsis already installed, skip this step.
If R is installed, chances are repository lists are correct. For a fresh
installation (of R) follow the instructions
here.
This will insure that apt get has the correct list of repositories.
- Install the equivalent of
Rtoolswith the following command:
sudo apt-get install r-base-dev
Rdistancerequires theunitspackage, and theunitspackage requires theudunitslibrary. Install theudunitslibrary on linux via:
sudo apt-get install libudunits2-dev
Once R is installed and running, install the current stable release or the development release with the following commands:
- Current release: Install the current release directly from CRAN. In the R terminal, issue…
install.packages("Rdistance")- Development version:
Rdistanceis under active development, and the development version often contains patches between official releases. Inspect commit messages for commits following the most recent release for a description of the patches. Install the development version from GitHub using:
if( !require("devtools") ){
install.packages("devtools")
}
devtools::install_github("tmcd82070/Rdistance")Beginner, intermediate, and advanced Rdistance tutorials are
here.
Our NEWS file contains salient changes across version numbers.