View source: R/coords.subset.r
coords.subset | R Documentation |
Subset (split) landmark coordinates via a grouping factor
coords.subset(A, group)
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 |
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.
Michael Collyer
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.