Squares: Areas of polygons

View source: R/squares.r

SquaresR Documentation

Areas of polygons

Description

Calculates areas of polygons

Usage

Squares(ppts, relative=FALSE)

Arguments

ppts

Output from Hulls() or Ellipses(), or just a list of polygons

relative

Calculate relative squares?

Details

"List of polygons" must be the list which contains any number of two-column numerical matrices of data frames, each represents the vertices of one polygon.

Might be useful to understand the variability of groups.

Value

Numerical (possibly named) vector of polygon areas, one element per polygon.

Author(s)

Alexey Shipunov

See Also

Hulls, Ellipses

Examples


iris.pca <- prcomp(iris[, -5])
iris.p <- iris.pca$x[, 1:2]

iris.h <- Hulls(iris.p[, 1:2], as.numeric(iris[, 5]), plot=FALSE)
Squares(iris.h, relative=TRUE)

iris.e <- Ellipses(iris.p, iris$Species, plot=FALSE, centers=TRUE)
Squares(iris.e)


shipunov documentation built on Feb. 16, 2023, 9:05 p.m.

Related to Squares in shipunov...