Learn R Programming

adehabitat (version 1.1-1)

histniche: Histograms of the Ecological Niche of a Species

Description

histniche draws histograms of the variables mapped in an object of class kasc (habitat available for the species). The histograms of the habitat used by a species (i.e. the niche) are computed from the locations of the focus species, and are added to the plot of available habitat for each variable, for comparison.

Usage

histniche(kasc, pts, type = c("h", "l"), adjust = 1,
          colZ = "blue", colS = "orange", ...)

Arguments

kasc
a raster map of class kasc
pts
a data frame with two columns, giving the coordinates of the species locations
type
what type of plot should be drawn. Possible types are: * "h" for histograms, * "l" for kernel density estimates (see ?density). By default, type = "h" is used. If type = "l" is used,
adjust
if type = "l", a parameter used to control the bandwidth of the density estimate (see ?density)
colZ
color for the histograms of the available pixels
colS
color for the histograms of the used pixels
...
further arguments passed to or from other methods

Examples

Run this code
## Example with factors and numeric variables
data(puechabon)
histniche(puechabon$kasc, puechabon$locs[, c("X", "Y")])
histniche(puechabon$kasc, puechabon$locs[, c("X", "Y")], type = "l")

Run the code above in your browser using DataLab