mirrorfill: Fill missing symmetrical landmarks for all specimens in an...

Description Usage Arguments Details Examples

Description

Given an N x 3 x M matrix, where N is the number of landmarks, 3 is the number of dimensions, and M is the number of specimens, fill in missing landmarks using their mirrored counterpart.

Usage

1
mirrorfill(A, l1, l2)

Arguments

A

An N x 3 x M matrix where N is the number of landmarks, 3 is the number of dimensions, and M is the number of specimens.

l1

Vector of indices for which landmarks to use to make a specimen midline

l2

Vector or matrix of pairs of symmetrical landmarks

Details

l2 should be either

l2 should be an even number length containing pairs of landmarks on either side of the specimen.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
 # Create array
 A <- array(rep(1:36, by = 4), dim = c(12, 3, 4))

 # Make it symmetrical
 A[7:12, 1:2, ] <- A[1:6, 1:2, ]
 A[7:12, 3, ] <- -A[1:6, 3, ]

 # Remove some data points
 missinga <- A
 missinga[1:2, , 1:3] <- NA

 mirrorA <- mirrorfill(missinga, l1 = c(3:6, 9:12), l2 = c(1, 7, 2, 8))

timcdlucas/paleomorph documentation built on May 31, 2019, 1:48 p.m.