[AniMov] Adehabitat: creating MCPs every two weeks for 32 different animals

Clément Calenge clement.calenge at oncfs.gouv.fr
Thu Jun 3 17:00:14 CEST 2010


 >So, I have three questions: is it only a date format issue or am I 
missing something else? If it is a date format issue, then, >how would 
it be possible to convert my dates in "YYyy-mm-dd" into "yymmdd"? and 
finally what loop functions or steps > could I take to create MCPs for 
the animals every two weeks.


The error is not a date format issue, as the date is not required for 
the calculation of the mcp. As the error message indicates, you need 
five relocations or more to compute a minimum convex polygon. That is, 
if you type:

any(table(all.id)<5)

If it returns TRUE, this means that for some animals, you have less than 
5 relocations, and so you cannot compute a MCP. To identify the animals 
that are characterized by 5 relocations or more, try:

ta <- table(all.id)<5
ta[ta<5]

And so, you can remove these animals, if you want to calculate a MCP for 
each one:

out <- names(ta[ta<5])
pc <- mcp(all.xy[!(all.id%in%out),], factor(all.id[!(all.id%in%out)])
plot(pc)

Now concerning the loop every two weeks, it is hard to describe you what 
to do without any data or precision on what you expect exactly... What 
are the limits of the "pairs of weeks"? are they the same for all 
animals? are you able to build a variable indicating the id of the 
"pairs of weeks" for each relocation (e.g. "2007-09-04" is in the "pair" 
1, etc.)? We need more details...
HTH,


Clément Calenge
-- 

Clément CALENGE
Cellule d'appui à l'analyse de données
Office national de la chasse et de la faune sauvage
Saint Benoist - 78610 Auffargis
tel. (33) 01.30.46.54.14

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.faunalia.it/pipermail/animov/attachments/20100603/eadfe54a/attachment-0001.htm>


More information about the AniMov mailing list