R/polysph.area.W.R

Defines functions polysph.area.W

Documented in polysph.area.W

polysph.area.W <- function(win) {
	stopifnot(inherits(win, c("sp2", "sp3", "sphwin")))
	if(inherits(win, "sphwin")) {
		win <- win
	}
	else {
		win <- win$win
	}
	stopifnot(win$type=="polygon")
	rad <- win$rad
	angs <- sph.angles(win=win)
	a.polygon <- (rad^2)*(sum(angs) - (length(angs)-2)*pi)
	a.polygon
}
baddstats/spherstat documentation built on Feb. 6, 2023, 1:45 a.m.