get_centsize: Calculate centroid size

Description Usage Arguments Details Value Functions See Also Examples

View source: R/coo_getters.R

Description

get_centsize provides the classical centroid size which is the square root of the sum of squared distances between each point along the shape and its centroid coordinates. get_centsize_norm is the square root of the mean of squared distances between each point along the shape and its centroid coordinates. See Details.

Usage

1
2
3

Arguments

x

coo_single, coo_list or mom_tbl

Details

get_centsize_norm does not depend on the number of points of the shape (see Examples) which is both typical for outlines and never seen for landmarks. See Dryden I. E. and Mardia K. V. 1998. Statistical Shape Analysis. Wiley, Chichester. Since get_centsize never made a lot of sense to me, as an "outline" person, and because get_centsize_norm will "work" in all cases, it is the default method in coo_scale

Can be used, among others, to record size before coo_scale.

Value

numeric or additional column

Functions

See Also

Other coo_descriptors: get_centpos(), get_range()

Examples

1
2
3
4
5
6
b <- bot %>% pick(1)
b %>% get_centsize
b %>% coo_sample(64) %>% get_centsize()

b %>% get_centsize_norm()
b %>% coo_sample(64) %>% get_centsize_norm()

MomX/Momocs2 documentation built on May 13, 2020, 4:28 a.m.