Learn R Programming

geomorph (version 3.1.2)

coords.subset: 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.

Examples

Run this code
# 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)

# }

Run the code above in your browser using DataLab