Learn R Programming

Momocs (version 1.4.1)

measure: Measures shape descriptors

Description

Calculates shape descriptors on Coo and other objects. Any function that returns a scalar when fed coordinates can be passed and naturally those of Momocs (pick some there apropos("coo_")). Functions without arguments (eg coo_area) have to be passed without brackets but functions with arguments (eg d) have to be passed "entirely". See examples.

Usage

measure(x, ...)

Value

a TraCoe object, or a raw data.frame

Arguments

x

any Coo object, or a list of shapes, or a shape as a matrix.

...

a list of functions. See examples.

See Also

Other premodern: coo_truss()

Examples

Run this code
bm <- measure(bot, coo_area, coo_perim)
bm
bm$coe

# how to use arguments, eg with the d() function
measure(wings, coo_area, d(1, 3), d(4, 5))

# alternatively, to get a data_frame
measure(bot$coo, coo_area, coo_perim)

# and also, to get a data_frame (one row)
measure(bot[1], coo_area, coo_perim)

Run the code above in your browser using DataLab