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

Description Usage Arguments Details Value Author(s) Examples

View source: R/two.d.array.r

Description

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

Usage

1

Arguments

A

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

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.

Value

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

Author(s)

Dean Adams and Emma Sherratt

Examples

1
2
3
4
data(plethodon) 
plethodon$land    #original data in the form of 3D array

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


geomorph documentation built on May 19, 2017, 8:30 p.m.
Search within the geomorph package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.