Learn R Programming

GeometricMorphometricsMix (version 0.6.0.1)

rescale_by_landmark_distance: Rescale landmark data based on interlandmark distances

Description

Convenience function which rescales a dataset of landmarks based on a vector of distances between two landmarks

Usage

rescale_by_landmark_distance(Data, lm1, lm2, lengths)

Value

The function outputs an array k x p x n of rescaled landmark coordinates

Arguments

Data

array k x p x n of k landmarks and p dimensions for n observations (specimens)

lm1, lm2

index of the two landmarks whose inter-landmark distance is known

lengths

vector of n lengths (distances between lm1 and lm2 in the appropriate scale)

Details

This function can be useful when one has the distance between two landmarks (e.g., obtained with a caliper), but a scale has not been set when acquiring the data (for instance, a scale bar was missing on photos, so configuration of landmarks are scaled in pixels).