| sahrlocs2niche {adehabitat} | R Documentation |
sahrlocs2niche converts an object of class sahrlocs into a
list that contains the arguments needed for a niche analysis
(function niche in package ade4).
sahrlocs2niche(x, ani = names(x$hr), var = names(x$sa), used = c("hr",
"locs"))
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))
|
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. |
Clement Calenge calenge@biomserv.univ-lyon1.fr
Doledec, S., Chessel, D. and Gimaret, C. (2000) Niche separation in community analysis: a new method. Ecology, 81, 2914–1927.
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.
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)