[R-sig-Geo] converting home range contours in 'adehabitat' to polygons

Tom_R tom.richardson at bristol.ac.uk
Thu Sep 2 11:58:08 CEST 2010


Hi List,
 I am trying to calculate the  area of overlap amongst a list of animal home
ranges; ten ants each, from five colonies. The help page for kernelUD
{adehabitat} states, " getverticeshr stores the home range contour as
objects of class area in a list of class kver, with one component per
animal."  [the 'components' are of class 'area'] .
However, I am having difficulties converting the list (class  'kver') of
home ranges (class 'area') to a list of polygons that can be manipulated
with spatstat.


        xy   <-  data.frame(cbind(x[colony==i & ant==j],  y[colony==i &
ant==j]))
	who <- as.factor(ant[colony==i & ant==j])
	ud   <-  kernelUD(xy, who, h = "href",  same4all = TRUE)
	ver  <- getverticeshr(ud, 50)
        class(ver)
> [1] "kver"


After converting the 'ver' list to polygons,  I would convert to owin
objects (in the spatstat package) and then use the functions intersect.owin
and area.owin to find the area of the overlap.

In summary:
1) How to convert a list of class kver, with one area object per animal?

Many thanks in advance!!
Tom Richardson




-- 
View this message in context: http://r-sig-geo.2731867.n2.nabble.com/converting-home-range-contours-in-adehabitat-to-polygons-tp5490501p5490501.html
Sent from the R-sig-geo mailing list archive at Nabble.com.



More information about the R-sig-Geo mailing list