coords.subset {geomorph}R Documentation

Subset landmark coordinates via a factor

Description

Subset (split) landmark coordinates via a grouping factor

Usage

coords.subset(A, group)

Arguments

A

A 3D array (p x k x n) containing landmark coordinates for a set of specimens

group

A grouping factor of length n, for splitting the array into sub-arrays

Details

This function splits a set of landmark coordinates into subsets, as described by a factor. The result is a list of separate sets of landmarks.

Author(s)

Michael Collyer

Examples

## Not run: 
data(pupfish) 
group <- factor(paste(pupfish$Pop, pupfish$Sex))
levels(group)
new.coords <- coords.subset(A = pupfish$coords, group = group)
names(new.coords) # see the list levels
# group shape means
lapply(new.coords, mshape)

## End(Not run)

[Package geomorph version 4.0.8 Index]