Squares | R Documentation |
Calculates areas of polygons
Squares(ppts, relative=FALSE)
ppts |
Output from Hulls() or Ellipses(), or just a list of polygons |
relative |
Calculate relative squares? |
"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.
Numerical (possibly named) vector of polygon areas, one element per polygon.
Alexey Shipunov
Hulls
, Ellipses
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.