ShapeDist2Specimen: Returns vector of Procrustes distances

Description Usage Arguments Value Citations Author(s)

View source: R/WrapProcDist_functions.R

Description

This function is a wrapper for the procdist function from the shapes package. It constructs distances between a target shape and reference shapes using the method specified.

Usage

1
2
3
4
5
6
7
ShapeDist2Specimen(
  RefShapes,
  TargetShape,
  LMDim = 2,
  ShapeArray = TRUE,
  Method = c("full", "partial", "Riemannian", "sizeandshape")
)

Arguments

RefShapes

either an array where rows are landmarks and columns are dimensions (i.e. x, y, and z) and slices are specimens or a matrix of coordinated where rows are specimens and columns are landmark coordinates in the format X1, Y1, X2, Y2... etc.

TargetShape

either a matrix where rows are landmarks and columns are dimensions (i.e. x, y, and z) or a vector of coordinated in the format X1, Y1, X2, Y2... etc.

LMDim

set to either 2 or 3 to denote whether the data is 2D or 3D. Default is set to 2.

ShapeArray

either TRUE to denote that TargetShape is in matrix format and Refshape is an array, or FALSE to denote that TargetShape is a vector and RefShape is a matrix. Please do not use a combination of formats as the function does not handle this.

Method

this is passed to the procdist function of the shapes package and must be set to one of the following options: "full" for full Procrustes distance, "partial" for partial Procrustes distance, "Riemannian" for Riemannian shape distance, or "sizeandshape" for size-and-shape Riemannian/Procrustes distance.

Value

The distance between the point of interest TargetShape to all other points in the reference material RefShapes.

Citations

Ian L. Dryden (2016). shapes: Statistical Shape Analysis. R package version 1.1-13. https://CRAN.R-project.org/package=shapes

Author(s)

Ardern Hulme-Beaman


ArdernHB/KnnDist documentation built on Feb. 5, 2021, 5:09 a.m.