Learn R Programming

Momocs (version 1.0.0)

truss: Truss measurement

Description

A method to calculate on shapes or on Coo truss measurements, which is all pairwise combinations of euclidean distances

Usage

truss(x)

Arguments

x
a shape or an Ldk object

Value

a named numeric or matrix

See Also

Other premodern: measure

Examples

Run this code
# example on a single shape
data(shapes)
cat <- coo_sample(shapes[4], 6)
truss(cat)

# example on wings dataset
data(wings)
tx <- truss(wings)
dim(tx)
# we normalize and plot an heatmap
txn <- apply(tx$coe, 2, .normalize)
# heatmap(txn)

txp <- PCA(tx, scale. = TRUE, center=TRUE, fac=wings$fac)
plot(txp, 1)

Run the code above in your browser using DataLab