Learn R Programming

geomorph (version 3.3.2)

mshape: Estimate mean shape for a set of aligned specimens

Description

Estimate the mean shape for a set of aligned specimens

Usage

mshape(A, na.action = 1)

Arguments

A

Either a list (length n, p x k), A 3D array (p x k x n), or a matrix (n x pk) containing GPA-aligned coordinates for a set of specimens

na.action

An index for how to treat missing values: 1 = stop analysis; 2 = return NA for coordinates with missing values for any specimen; 3 = attempt to calculate means for coordinates for all non-missing values.

Details

The function estimates the average landmark coordinates for a set of aligned specimens. Three different methods are available for missing data (see Arguments and Examples).

One can then use the generic function plot to produce a numbered plot of landmark positions and potentially add links, in order to review landmark positions

Examples

Run this code
# NOT RUN {
data(plethodon)
Y.gpa<-gpagen(plethodon$land)    #GPA-alignment
A <- Y.gpa$coords
A[[1]] <- NA # make a missing value, just for example

mshape(Y.gpa$coords)   # mean (consensus) configuration
# mshape(A, na.action = 1) # will return an error
mshape(A, na.action = 2) # returns NA in spot of missing value
mshape(A, na.action = 3) # finds mean values from all possible values

# }

Run the code above in your browser using DataLab