Learn R Programming

adehabitat (version 1.8.20)

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:

tab

a data frame giving the habitat composition of the home range of animals

factor

a factor giving for each row of tab the name of the corresponding animal

weight

a 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
# NOT RUN {
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