unbend.spine: Correct for lateral bending in fish geometric morphometric...

View source: R/unbend.spine.R

unbend.spineR Documentation

Correct for lateral bending in fish geometric morphometric landmarks

Description

Correct for the impact of lateral bending along the spine of a fish in geometric morphometric landmarks. Fits a polynomial function along the length and width of the specimen, determines the perpendicular residuals and arc length along the polynomial and these are used as the new length and width landmarks. Landmarks are first centered and bilaterally aligned using bilat.align.

Usage

unbend.spine(coords, land.pairs, deg = 3, restricted = NULL)

Arguments

coords

A matrix of landmark coordinate data. Columns should be coordinates, and rows landmarks.

land.pairs

A 2-column matrix giving the bilaterally paired landmarks. One column should be all "left" landmarks and one all "right" landmarks.

deg

The degrees for the polynomial function, passed to the function "poly". Typically 2 or 3.

restricted

A limited set of landmarks (row numbers for the coords matrix) to use for bilateral alignment. Typically those representing a rigid/fixed structure (e.g., head). Passed to bilat.align.

Details

Resulting landmark data is in the same scale as the original landmark configuration. Can be applied over multiple specimens using for-loops or apply functions.

Value

bilat.aligned

Provides the bilaterally aligned landmark data as a matrix

unbent

Provides the bilaterally aligned and unbent landmark data as a matrix

Author(s)

J.H. Arbour

References

Arbour,J.H. In Prep. Get Unbent! R Tools for the removal of arching and bending of fish specimens in geometric morphometric shape analysis

See Also

bilat.align, unbend.tps.poly

Examples



data(darters)
library(rgl)
## bilaterally aligned using only head landmarks
lands.unbent<-unbend.spine(darters$coords[,,2],
darters$land.pairs,deg=3, restricted=darters$restricted)$unbent

plot3d(lands.unbent, aspect=FALSE)



LOST documentation built on July 4, 2024, 9:06 a.m.