Skip to content

tmcd82070/Rdistance

Repository files navigation

CRAN Version CRAN Downloads CRAN Total Downloads codecov Lifecycle: stable

Simplified Distance-Sampling in R

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.

Features

  • Line-transect and point-transects
  • Likelihood functions:
    • half-normal (halfnorm)
    • hazard rate (hazrate)
    • negative exponential (negexp)
  • 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

Installation

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.

Windows - Rtools:

  1. Install Rtools: Download the correct Rtools installer for your version of R from here. When download completes, run the installer (double-click it) and accept all default options. If Rtools is already installed, skip this step.

Ubuntu - r-base-dev:

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.

  1. Install the equivalent of Rtools with the following command:
sudo apt-get install r-base-dev
  1. Rdistance requires the units package, and the units package requires the udunits library. Install the udunits library on linux via:
sudo apt-get install libudunits2-dev

Install Rdistance :

Once R is installed and running, install the current stable release or the development release with the following commands:

  1. Current release: Install the current release directly from CRAN. In the R terminal, issue…
install.packages("Rdistance")
  1. Development version: Rdistance is 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")

Tutorials

Beginner, intermediate, and advanced Rdistance tutorials are here.

RECENT CHANGES

Our NEWS file contains salient changes across version numbers.

About

An R package for simple, regression-like, distance-based analyses

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 6

Languages