Description Usage Arguments Details Value Author(s) See Also Examples
as.sahrlocs
creates objects of class sahrlocs
.
This class has a central place in habitat selection studies relying on
radio-tracking data. Niche analysis and K-select analysis can be
performed using this class of objects. This class may also be used
for exploratory purposes. This class of
object has three main components: an object of class kasc
describing the study area, an object of class kasc
describing
what is available to the animals, and an object of class kasc
describing the relocations of the animals (sahrlocs
= Study
Area - Home Range - reLOCationS). getsahrlocs
converts one of the
components of an object of class sahrlocs
into an object of class
kasc
.
1 2 3 4 | as.sahrlocs(mlocs, mhr, msa, descan = NULL)
getsahrlocs(x, what = c("sa", "hr", "locs"))
## S3 method for class 'sahrlocs'
print(x, ...)
|
mlocs |
an object of class |
mhr |
an object of class |
msa |
an object of class |
descan |
an optionnal data frame with the number of rows equal to the number of monitored animals. Each column of this data frame gives any type of information on the monitored animals (e.g. sex, age, and so on) |
what |
a character string giving the component of the
|
x |
an object of class |
... |
additionnal parameters to be passed to the generic
function |
The different maps in the input list of objects kasc
should describe
the same area (same attributes: same cellsize
, same xll
,
same yll
and same dimensions).
Returns one object of class sahrlocs
, which is a list
containing the input arguments for the function
as.sahrlocs
. Objects of class sahrlocs
have the same
attributes as objects of class kasc
(xll
, yll
,
cellsize
, nrow
, and ncol
).
getsahrlocs
returns
an object of class kasc
(see kasc
).
Clement Calenge clement.calenge@oncfs.gouv.fr
kasc
for additionnal information on objects
of class kasc
, hr.rast
and buffer.ani
for the creation of the "hr"
component of this object, count.points.id
for the
creation of the "locs"
component of this
object, plot.sahrlocs
and image.sahrlocs
for a graphical display of such objects.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | data(puechabon)
kasc <- puechabon$kasc
locs <- puechabon$locs
## Computes the home ranges of the animals...
cp <- mcp(locs[,4:5], locs[,1])
## ... and converts it to raster
cprast <- hr.rast(cp, kasc)
locrast <- count.points.id(locs[,4:5], locs[,1], kasc)
## Creation of the sahrlocs object
(sahr <- as.sahrlocs(locrast, cprast, kasc))
## adds information on the monitored animals
age <- factor(tapply(locs[,2], locs[,1], mean))
sex <- factor(tapply(locs[,3], locs[,1], mean))
info <- as.data.frame(cbind(sex, age))
(sahr <- as.sahrlocs(locrast, cprast, kasc, info))
## Gets the "study area" component of the object
toto <- getsahrlocs(sahr)
image(toto)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.