April 11, 2018
"By the habitat… is meant the kind of situation in which the organism lives." (McDougall, 1927)
"Resources and conditions present in an area that produce occupancy—including survival and reproduction—by a given organism." (Hall et al., 1997)
→ Inherently multivariate!
Critical to characterize a species habitat and how it is used.
Type | # Locs | % Locs | % Surface | Ratio |
---|---|---|---|---|
A | 50 | 52.1 | 58 | 0.90 |
B | 17 | 17.7 | 23 | 0.77 |
C | 7 | 7.3 | 11 | 0.66 |
D | 5 | 5.2 | 5 | 1.04 |
E | 17 | 17.7 | 3 | 5.9 |
Aim of habitat selection is to highlight relationships between the distribution of locations and environmental features.
→ Habitat selection is statistically defined as a disproportionate usage of available habitat.
"An n-dimensional hypervolume, every point in which corresponds to a state of the environment which would permit the species to exist indefinitely"
The data come from the PhD of Daniel Maillard on wild boars (Sus scrofa) in Puéchabon (France). Six wild boards have been captured and monitored with radio-telemetry in July and August in the years 1993–1995.
During the day, wild boars rest in shelters, which have been located almost daily. We are trying to assess what are the habitat characteristics that wild boars look for to find shelter.
Maillard D. (1996) Occupation et utilisation de la garrigue et du vignoble méditerranéens par le sanglier (Sus scrofa L.). In: Biologie des populations et des écosystemes, 235 pp. Université de droit, d'économie et des sciences d'Aix-Marseille III.
Install necessary packages:
install.packages(c("adehabitatHS", "rgdal"))
Download and extract data.zip
in your working directory, and download the R code 1.R
:
download.file( "https://mablab.org/project/r/2018-04-11-niche-analyses/data.zip", "data.zip") unzip("data.zip", exdir = "data") file.remove("data.zip") download.file( "https://mablab.org/project/r/2018-04-11-niche-analyses/1.R", "1.R")
library("adehabitatHS") locs <- read.delim("data/locs.txt") coordinates(locs) <- ~X+Y head(locs)
## coordinates NOM ## 1 (699889, 3161560) Brock ## 2 (699291, 3161120) Brock ## 3 (700046, 3161540) Brock ## 4 (700050, 3161580) Brock ## 5 (699811, 3161390) Brock ## 6 (698840, 3161030) Brock ## Coordinate Reference System (CRS) arguments: NA
library("rgdal") elev <- readGDAL("data/altitude.asc") image(elev) plot(locs, add = TRUE)
li <- lapply(list.files("data", pattern = ".asc", full.names = TRUE), readGDAL) names(li) <- sub(".asc", "", list.files("data", pattern = ".asc")) maps <- do.call(cbind, li) fullgrid(maps) <- FALSE names(maps) <- sub(".asc", "", list.files("data", pattern = ".asc")) mimage(maps)
We check the presence of any structure with a Principal Component Analysis:
tab <- slot(maps, "data") pc1 <- dudi.pca(tab) s.corcircle(pc1$co)
maps$pc1 <- pc1$li[, 1] maps$pc2 <- pc1$li[, 2] mimage(maps)
pr <- slot(count.points(SpatialPoints(locs), maps), "data")[, 1] enfa1 <- enfa(pc1, pr) scatter(enfa1, pts = TRUE) hist(enfa1) hist(enfa1, scores = FALSE, type = "l")
maps$mar <- enfa1$li$Mar mimage(maps)
Several multivariate niche analyses:
Habitat selection is not simple:
adehabitat
for the R software: A tool for the analysis of space and habitat use by animals. Ecological Modelling, 197:516–519.