histniche: Histograms of the Ecological Niche

Description Usage Arguments Author(s) Examples

View source: R/histniche.r

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

1
2
3
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 [email protected]

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 

data(puechabon)
cp <- count.points(puechabon$locs[,c("X","Y")], puechabon$kasc)
puechabon$kasc
li <- kasc2df(puechabon$kasc)
cpi <- c(cp)[li$index]

histniche(li$tab, cpi)
histniche(li$tab, cpi, ty="l")


## End(Not run)

adehabitat documentation built on Jan. 28, 2018, 5:02 p.m.