ProcDistanceTable: Wrapper for procdist function to output a distance table

Description Usage Arguments Value Citations See Also Examples

View source: R/WrapProcDist_functions.R

Description

This function builds a square matrix of pairwise procrustes distances among specimens using the procdist function from the shapes package.

Usage

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

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.

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.

RefIDs

is a vector of the unique identifiers for each of the reference specimens in the reference dataset. These values will be used for naming the columns and rows. Default is set to NA and if a vector is not supplied the columns and rows will remain numbered consecutively.

Value

This function returns a square matrix of Procrustes distances, which is required for both the IDbyDistanceRawDataCCV and the BoundaryFinder functions.

Citations

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

See Also

ProcDistanceTablePar

Examples

1
#RatDistMat <- ProcDistanceTable(Rpraetor$LMs)

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