Learn R Programming

geomorph (version 1.1-1)

read.morphologika: Read 3D landmark data from Morphologika files

Description

Read Morphologika files to obtain 3D landmark coordinates and specimen information

Usage

read.morphologika(file, plot = FALSE)

Arguments

file
A morphologika text file. File name can be written in manually, including path, or obtained using directory/file manipulation functions e.g., list.files
plot
Logical should (unaligned) specimens be plotted? Defaults to FALSE.

Value

  • Function returns a list with the following components:
  • coordsIf Morphologika headers "[labels]" and "[labelvalues]" are not present in the file, function only returns a (p x k x n) array, where p is the number of landmark points, k is the number of landmark dimensions, and n is the number of specimens
  • dataframeIf Morphologika headers "[labels]" and "[labelvalues]" are present read.morphologika returns the above p x k x n array and a dataframe containing specimen specific information stored in file

Details

This function reads the commonly used Morphologika file format for 2D and 3D landmarks. Landmark coordinates and specimen information may then be used to conduct GPA using gpagen, and select three-dimensional semilandmarks on curves (if present) using digit.curves. If the Morphologika headers "[labels]" and "[labelvalues]" are present, then a data matrix containing all individual specimen information is returned. If "[labels]" and "[labelvalues]" are not present in the file, then only landmark coordinates are returned.

See Also

list.files