get_chull_area {Momocs}R Documentation

Calculates convex hull area/volume of PCA scores

Description

May be useful to compare shape diversity. Expressed in PCA units that should only be compared within the same PCA.

Usage

get_chull_area(x, fac, xax = 1, yax = 2)

get_chull_volume(x, fac, xax = 1, yax = 2, zax = 3)

Arguments

x

a PCA object

fac

(optionnal) column name or ID from the $fac slot.

xax

the first PC axis to use (1 by default)

yax

the second PC axis (2 by default)

zax

the third PC axis (3 by default only for volume)

Details

get_chull_area is calculated using coo_chull followed by coo_area; get_chull_volume is calculated using geometry::convexhulln

Value

If fac is not provided global area/volume is returned; otherwise a named list for every level of fac

Examples

bp <- PCA(efourier(bot, 12))
get_chull_area(bp)
get_chull_area(bp, 1)

get_chull_volume(bp)
get_chull_volume(bp, 1)

[Package Momocs version 1.4.1 Index]