histniche: Histograms of the Ecological Niche

View source: R/histniche.r

histnicheR Documentation

Histograms of the Ecological Niche

Description

histniche draws histograms of the niche-environment system: an histogram of the available resource units (environment) is drawn on the same graph as an histogram of the used resource units (i.e. the niche), for comparison.

Usage

histniche(x, pr, type = c("h", "l"), adjust = 1,
          Acol, Ucol, Aborder, Uborder, Alwd = 1,
          Ulwd = 1, ylim, ncla = 15, ...)

Arguments

x

a data frame giving the value of environmental variables (columns) in resource units (rows, e.g. the pixels of a raster map)

pr

a vector of integers with the same length as nrow(x) (giving for example the number of detections in the pixels)

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, the position of the mean of each distribution is indicated by dotted lines

adjust

if type = "l", a parameter used to control the bandwidth of the density estimate (see ?density)

Acol

color for the histograms of the available pixels

Ucol

color for the histograms of the used pixels

Aborder

if type = "h", color for the border of the histograms of the available pixels (see help(hist.default))

Uborder

if type = "h", color for the border of the histograms of the used pixels (see help(hist.default))

Alwd

if type = "l", line width for the density estimate of the available pixels

Ulwd

if type = "l", line width for the density estimate of the used pixels

ylim

the limits for the y axis

ncla

The number of classes of the histogram

...

further arguments passed to or from other methods

Author(s)

Mathieu Basille basille@ase-research.org

Examples

## Not run: 

data(puechabonsp)
cp <- count.points(puechabonsp$relocs, puechabonsp$map)
puechabonsp$map

histniche(slot(puechabonsp$map, "data"), slot(cp, "data")[,1])
histniche(slot(puechabonsp$map, "data"), slot(cp, "data")[,1],
          ty="l")


## End(Not run)

adehabitatHS documentation built on Sept. 11, 2024, 7:38 p.m.