knitr::opts_chunk$set( collapse = TRUE , echo = FALSE , comment = "#>" , fig.path = "README_files/README-" , out.width = "100%" ) includeFigure = function(x) { knitr::include_graphics(file.path("README_files", x)) }
includeFigure("RdistanceTopBanner.PNG")
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. For those ready to take on an analysis, the best place to start is one of our vignettes or in the Examples section (below).
Vignettes:
includeFigure("RdistanceSeparator.PNG")
halfnorm
) hazrate
) negexp
)Gamma
)logistic
)smu
)sine
, cosine
, and hermite
print
, plot
, predict
, AIC
, etc.distance ~ elevation + observer
)includeFigure("RdistanceSeparator.PNG")
The current release is here.
Install the development version from GitHub with:
if( !require("devtools") ){ install.packages("devtools") } devtools::install_github("tmcd82070/Rdistance")
Install the stable version directly from CRAN:
install.packages("Rdistance")
includeFigure("RdistanceSeparator.PNG")
These examples show basic estimation of abundance via distance-sampling analyses, both with and without covariates. Additional information can be found on our wiki and in our vignettes.
if( !require("units") ){ install.packages("units") } library(Rdistance) library(units) # Example data data("sparrowDetectionData") # access example data data("sparrowSiteData") head(sparrowDetectionData) # inspect data head(sparrowSiteData)
# Set upper (right) truncation distance whi <- set_units(150, "m") # Fit hazard rate likelihood dfuncFit <- dfuncEstim(dist ~ 1 , detectionData = sparrowDetectionData , likelihood = "hazrate" , w.hi = whi) dfuncFit <- abundEstim(dfuncFit , detectionData = sparrowDetectionData , siteData = sparrowSiteData , area = set_units(2500, "hectares")) summary(dfuncFit) plot(dfuncFit)
dfuncFit <- dfuncEstim(dist ~ bare , detectionData = sparrowDetectionData , siteData = sparrowSiteData , likelihood = "hazrate" , w.hi = whi) dfuncFit <- abundEstim(dfuncFit , detectionData = sparrowDetectionData , siteData = sparrowSiteData , area = set_units(2500, "hectares") , ci=NULL) summary(dfuncFit) plot(dfuncFit, newdata = data.frame(bare = c(30, 40, 50)), lty = 1)
# Example data data("thrasherDetectionData") # access example data data("thrasherSiteData") head(thrasherDetectionData) # inspect example data head(thrasherSiteData)
dfuncFit <- dfuncEstim(dist ~ 1 , detectionData = thrasherDetectionData , likelihood = "hazrate" , pointSurvey = TRUE) dfuncFit <- abundEstim(dfuncFit , detectionData = thrasherDetectionData , siteData = thrasherSiteData , area = set_units(100, "acres"), ci=NULL) summary(dfuncFit) plot(dfuncFit)
dfuncFit <- dfuncEstim(dist ~ bare + shrub , detectionData = thrasherDetectionData , siteData = thrasherSiteData , likelihood = "hazrate" , pointSurvey = TRUE) dfuncFit <- abundEstim(dfuncFit , detectionData = thrasherDetectionData , siteData = thrasherSiteData , area = set_units(100, "acres"), ci=NULL) summary(dfuncFit) plot(dfuncFit, newdata = data.frame(bare = c(30, 35, 40) , shrub = 20), lty = 1)
includeFigure("RdistanceSeparator.PNG")
See our NEWS file for recent changes.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.