select.procrustes: Select Procrustes values

View source: R/select.procrustes.R

select.procrustesR Documentation

Select Procrustes values

Description

Selects specific values of specimens from a Procrustes superimposition

Usage

select.procrustes(procrustes, selector = base::mean, factors)

Arguments

procrustes

Procrustes data of class "gpagen" or an "array" or "list" of coordinates.

selector

A function of which values to select (default = mean).

factors

A list of elements names or IDs to split the data.

Value

The coordinates of a hypothetical specimen (e.g. the mean specimen).

Author(s)

Thomas Guillerme

Examples

## Loading the plethodon dataset
require(geomorph)
data(plethodon)

## Performing a procrustes superimposition
procrustes <- geomorph::gpagen(plethodon$land, print.progress = FALSE)

## Selecting the mean Procrustes
mean_procrustes <- select.procrustes(procrustes, selector = base::mean)

## Selecting the minimum Procrustes shape for each species
min_procrustes <- select.procrustes(procrustes, selector = min,
                                    factors = list(which(plethodon$species == "Jord"),
                                                   which(plethodon$species == "Teyah")))



TGuillerme/landvR documentation built on July 4, 2025, 10:16 p.m.