rescale_by_landmark_distance: Rescale landmark data based on interlandmark distances

View source: R/rescale_by_landmark_distance.R

rescale_by_landmark_distanceR Documentation

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)

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).

Value

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


fruciano/GeometricMorphometricsMix documentation built on Jan. 31, 2024, 6:24 a.m.