Learn R Programming

adehabitat (version 1.8.20)

sahrlocs2niche: OMI Analysis of Radio-Tracking Data

Description

sahrlocs2niche converts an object of class sahrlocs into a list that contains the arguments needed for a niche analysis (function niche in package ade4).

Usage

sahrlocs2niche(x, ani = names(x$hr), var = names(x$sa), used = c("hr",
"locs"))

Arguments

x

an object of class sahrlocs.

ani

a character vector giving the name of the animals in the analyses

var

a character vector giving the name of the variables in the analyses

used

a character string. If "hr", the cells of the raster map that are considered used by the animals are taken from the hr component of the object sahrlocs, if "locs", the cells of the raster map that are considered used by the animals are taken from the locs component (see as.sahrlocs))

Value

Returns a list with three components:

index

a vector of integer giving the index of the rows of x$sa kept for the analysis (this component may then be used with the function df2kasc).

tab

the table on which the dudi analysis will be processed.

y

a table giving the weights of the niche analysis.

References

Doledec, S., Chessel, D. and Gimaret, C. (2000) Niche separation in community analysis: a new method. Ecology, 81, 2914--1927.

See Also

as.sahrlocs for additional information on the objects of class sahrlocs, niche for an OMI analysis, and kasc2df for additional information on the index component of the output.

Examples

Run this code
# NOT RUN {
data(puechabon)
sahr <- puechabon$sahr

s <- sahrlocs2niche(sahr, used = "locs")


# 1. dudi.mix of the dataset
pc <- dudi.mix(s$tab, scannf = FALSE)

# 2. niche analysis
n <- niche(pc, s$y, scannf = FALSE)

plot(n)
# }

Run the code above in your browser using DataLab