Learn R Programming

adehabitat (version 1.1-1)

sahrlocs2kselect: Preparation of K-Select Analysis

Description

sahrlocs2kselect converts an object of class sahrlocs into a list that contains the arguments needed for a kselect analysis (see help(kselect)).

Usage

sahrlocs2kselect(sahr)

Arguments

sahr
an object of class sahrlocs

Value

  • Returns a list with the following components:
  • taba data frame giving the habitat composition of the home range of animals
  • factora factor giving for each row of tab the name of the corresponding animal
  • weighta numeric vector giving for each row of tab the number of relocations numbered in this cell of the raster map

References

Calenge, C., Dufour, A.B. and Maillard, D. (submitted). K-select analysis, a new method to analyse habitat selection in radio-tracking studies.

See Also

as.sahrlocs for additional information on the objects of class sahrlocs, kselect for a K-select analysis, and kasc2df for additional information on the index component of the output.

Examples

Run this code
data(puechabon)
sahr <- puechabon$sahr
s <- sahrlocs2kselect(sahr)

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

# 2. k-select analysis
kn <- kselect(pc, s$factor, s$weight, scannf = FALSE)


scatter(kn)

Run the code above in your browser using DataLab