xxyy.to.array {prWarp} | R Documentation |
Convert landmark data matrix into array (p x k x n)
Description
Convert a matrix of landmark coordinates into a three-dimensional array
Usage
xxyy.to.array(M, p, k = 2)
Arguments
M |
A matrix of dimension n x [p x k] containing landmark coordinates for a set of specimens. Each row contains all landmark coordinates for a single specimen. The first columns correspond to the X coordinates for all landmarks, etc. |
p |
Number of landmarks |
k |
Number of dimensions (2 or 3) |
Value
Function returns a 3D array (p x k x n), where p is the number of landmark points, k is the number of landmark dimensions (2 or 3), and n is the number of specimens. The third dimension of this array contains names for each specimen if specified in the original input matrix.
See Also
Examples
X <- matrix(rnorm(40), nrow = 4) # Random 2D coordinates of 5 landmarks for 4 specimens
xxyy.to.array(X, 5, 2)
[Package prWarp version 1.0.1 Index]