MCHu {adehabitatHR} | R Documentation |
The Class "MCHu": Managing Home Ranges Built by Multiple Convex Hulls
Description
The class "MCHu"
is designed to store home ranges built by
multiple convex hulls, for example built using the single-linkage
cluster algorithm (function clusterhr
) or the LoCoH
(e.g. function LoCoH.k
).
The function plot.MCHu
allows to graphically display the
home-ranges.
MCHu.rast
allows to compute a raster map of the home ranges.
MCHu2hrsize
allows to compute the home range size for specified
percentage levels for the home range (see
help(plot.hrsize)
).
spoldf2MCHu
allows to convert a SpatialPolygonsDataFrame
storing home ranges built by multiple convex hulls into an object of
class "MCHu"
.
Usage
## S3 method for class 'MCHu'
print(x, ...)
## S3 method for class 'MCHu'
plot(x, percent="all", points=NULL, ...)
MCHu.rast(x, spdf, percent=100)
MCHu2hrsize(x, percent=seq(20,100, by=10), plotit=TRUE)
spoldf2MCHu(spdf, nam="a")
Arguments
x |
an object of class |
spdf |
an object of class |
points |
an object of class |
percent |
the percentage level of the home range. For the
function |
plotit |
a logical value indicating whether the results should be plotted. |
nam |
the name of the animal to be used in the object of class
|
... |
additional arguments to be passed to the functions
|
Details
The class "MCHu"
is basically a list of objects of class
SpatialPolygonsDataFrame
, with one data frame per animal.
Value
The function MCHu.rast
returns an object of class
SpatialPixelsDataFrame
.
The function MCHu2hrsize
returns an object of class
hrsize
(see ?mcp.area
).
Author(s)
Clement Calenge clement.calenge@ofb.gouv.fr
See Also
clusthr
and LoCoH
for home range
estimation methods returning this class of objects.
Examples
## Not run:
data(puechabonsp)
## The relocations:
locs <- puechabonsp$relocs
locsdf <- as.data.frame(locs)
head(locsdf)
## Shows the relocations
plot(locs, col=as.numeric(locsdf[,1]))
## 12 points seems to be a good choice (rough asymptote for all animals)
## the k-LoCoH method:
nn <- LoCoH.k(locs[,1], k=12)
## Graphical display of the results
plot(nn, border=NA)
## Rasterize the home range on the elevation map:
image(puechabonsp$map)
(oo <- MCHu.rast(nn, puechabonsp$map))
image(oo)
## End(Not run)