Learn R Programming

geomorph (version 3.0.3)

coords.subset: Subset landmark coordinates via a factor

Description

Subset (split) landmark coordinates via a grouping factor

Usage

coords.subset(A, group)

Arguments

A

An array of landmarks with dimensions p x k x n

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 results is a list of separate sets of landmarks.

Examples

Run this code
data(pupfish) 
group <- factor(paste(pupfish$Pop, pupfish$Sex))
levels(group)
coords.subset(A = pupfish$coords, group = group)

Run the code above in your browser using DataLab