geomorph (version 3.0.3)

two.d.array: Convert (p x k x n) data array into 2D data matrix

Description

Convert a three-dimensional array of landmark coordinates into a 2-dimensional matrix

Usage

two.d.array(A)

Arguments

A

An array (p x k x n) containing landmark coordinates for a set of specimens

Value

Function returns a two-dimensional matrix of dimension (n x [p x k]), where rows represent specimens and columns represent variables.

Details

This function converts a (p x k x n) array of landmark coordinates into a 2-dimensional matrix. The latter format of the shape data is useful for performing subsequent statistical analyses in R (e.g., PCA, MANOVA, PLS, etc.). Row labels are preserved if included in the original array.

Examples

Run this code
data(plethodon) 
plethodon$land    #original data in the form of 3D array

two.d.array(plethodon$land)   # Convert to a 2D data matrix

Run the code above in your browser using DataCamp Workspace