variation.range: Range of variation

View source: R/variation.range.R

variation.rangeR Documentation

Range of variation

Description

Selecting the range of differences between the specimen with the maximum and minimum variation

Usage

variation.range(
  procrustes,
  type = "spherical",
  angle = "degree",
  what = "radius",
  ordination,
  axis,
  return.ID = FALSE,
  CI
)

Arguments

procrustes

Procrustes data of class "gpagen" or "array".

type

Which type of coordinates to calculate (see coordinates.difference - default is "spherical"). See details.

angle

Which type of angle to calculate (see coordinates.difference - default is "degree").

what

Which element from the coordinates.difference to use (default is "radius").

ordination

Optional, either TRUE to perform an ordination or directly an ordinated PCA matrix ("prcomp") to calculate the range from there.

axis

Optional, if an ordinated matrix is used, which axis (axes) to use. If left empty, all the axes will be used.

return.ID

logical, whether to return the ID of the max/min specimens or not.

CI

Optional, a value of confidence interval to use (rather than the max/min).

Details

When type = "spherical", the distances are relative to each landmark, the selection of the two most extreme specimen is based on their absolute value (i.e. to select the two most distant specimen). Potential CI limits only affect the right side of the curve (the maxima). When type = "vector", the distances are absolute from the centre of the specimen (and can be negative), the selection of the two most extreme specimen is thus based on the absolute values as well (to select the most distance specimen). However, potential CI limits affect both size of the curve (removing the maxima and minima).

Author(s)

Thomas Guillerme

See Also

coordinates.difference, area.diff, rand.test

Examples

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

## Performing the Procrustes superimposition
proc_super <- gpagen(plethodon$land, print.progress = FALSE)

## Getting the two most different specimen based on their landmark change radii
spec_range <- variation.range(proc_super, return.ID = TRUE)

## The minimum and maximum specimen
spec_range$min.max

## The range of variation per landmark
spec_range$range

## Getting the two most different specimen based on the first axis of the ordination
variation.range(proc_super, ordination = TRUE, axis = 1, type = "vector", what = "length")

## Getting the range variation between specimen using a 95 confidence interval range
spec_range95 <- variation.range(proc_super, CI = 0.95, return.ID = TRUE)

## The absolute maximum and minimum specimens
spec_range$min.max

## The lower and upper 95% range CI specimens
spec_range95$min.max


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