Skip to content
Prev 19871 / 29559 Next

mcp calculation

Dear Lutfor,

It should work out of the box with the current version of adehabitatHR, 
which does not rely on gpclib for MCP estimations. Here is an example using 
R 3.0.2 and adehabitatHR 0.4.10:

## Load adehabitatHR
library(adehabitatHR)

## This give me:
#
# Loading required package: sp
# Loading required package: deldir
# deldir 0.1-1
# Loading required package: ade4
#
# Attaching package: ?ade4?
#
# The following object is masked from ?package:base?:
#
#     within
#
# Loading required package: adehabitatMA
# Loading required package: adehabitatLT
# Loading required package: CircStats
# Loading required package: MASS
# Loading required package: boot
#
## As you can see, gpclib is not loaded.

## Load example data
data(puechabonsp)
rel <-  puechabonsp$relocs

## Estimates the MCP
cp <- mcp(rel[,1])

## The home-range size
as.data.frame(cp)
#          id     area
# Brock Brock 22.64670
# Calou Calou 41.68815
# Chou   Chou 71.93205
# Jean   Jean 55.88415

## Computation of the home-range size:
mcp.area(rel[,1])
#        Brock    Calou      Chou      Jean
# 20   2.01000  8.06000  15.74195   1.13685
# 25   2.05565  9.96440  16.11330   1.48680
# 30   2.44080 13.27520  16.67075   1.69070
# 35   6.46570 13.65330  18.04590   2.33475
# 40   7.01845 14.88035  22.65340   4.09565
# ...

Hope this helps,
Mathieu.


Le 11/27/2013 05:31 PM, Lutfor a ?crit :