Dear all,
Does anyone know of a function that calculates the area of the outer 
polygon constructed from a data frame with co-ordinates? For example,
library(splancs)
test = rbind(c(0,0), c(10,0),c(10,10),c(0,20))
plot(test)
areapl(test)
[1] 150
This is OK, but I want the same area to be returned (150) when adding 
yet another co-ordinate in the middle of the polygon:
test = rbind(c(0,0), c(10,0),c(10,10),c(0,20),c(5,5))
plot(test)
areapl(test)
[1] 100

I have also tested area.owin() in library(spatstat) but the co-ordinates 
of the outer polygon is one of the arguments.


Thanks!

Tord

-- 

NOTE, new e-mail and contact information:

Tord Snäll
Department of Conservation Biology
Swedish University of Agricultural Sciences (SLU)
P.O. 7002, SE-750 07 Uppsala, Sweden
Office/Mobile/Fax
+46-18-672740/+46-730-891356/+46-18-673537
E-mail: [EMAIL PROTECTED]
www.nvb.slu.se/staff_tordsnall

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to