Learn R Programming

Momocs (version 1.4.1)

get_chull_area: 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)

Value

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

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

Examples

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

get_chull_volume(bp)
get_chull_volume(bp, 1)

Run the code above in your browser using DataLab