Calculate the centroid size (CS): the square root of the sum of squared distances from each point to the centroid.
Value
If
xis a single matrix: returns a numeric scalarIf
xis a list: returns a numeric vectorIf
xis a tibble: returns a numeric vector extracted from coo column
Details
Centroid size is a common size measure in geometric morphometrics. It is scale-independent and used for allometric correction.
For tibbles, this function extracts values without modifying the tibble.
Use within mutate() to add as a column: mutate(df, cs = get_centroid_size(coo))
