Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

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.

Author(s)

Michael Collyer

Examples

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)

geomorph

Geometric Morphometric Analyses of 2D/3D Landmark Data

v4.0.0
GPL (>= 2)
Authors
Dean Adams [aut, cre], Michael Collyer [aut], Antigoni Kaliontzopoulou [aut], Erica Baken [aut]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.