Learn R Programming

geomorph (version 3.3.2)

define.modules: Define modules (landmark partitions)

Description

An interactive function to define which landmarks should be assigned to each module (landmark partition).

Usage

define.modules(spec, nmodules)

Arguments

spec

A p x k matrix containing landmark coordinates of a single specimen (2D or 3D)

nmodules

Number of modules to be defined

Value

Function returns a vector of which landmarks belong in which module (e.g. 1, 1, 1, 2, 2, 3, 3, 3, 2) to be used with modularity.test or integration.test.

Details

Function takes a matrix of digitized landmark coordinates (e.g. from mshape) and allows the user to assign landmarks to each module. The output is a list of which landmarks belong in which partition, to be used by modularity.test or integration.test.

Selection in 2D

Choosing which landmarks will be included in each module involves landmark selection using a mouse in the plot window. The user is prompted to select each landmark in turn to be assigned to module 1: using the LEFT mouse button (or regular button for Mac users), click on the hollow circle to choose the landmark. Selected landmarks will be filled in. When all landmarks for module 1 are chosen, press 'esc', and then start selecting landmarks for module 2. Repeat until all modules are defined.

Selection in 3D

Choosing which landmarks will be included in each module involves landmark selection using a mouse in the rgl plot window. The user is prompted to select one or more landmarks. To do so, use the RIGHT mouse button (or command + LEFT button for Mac users), draw a rectangle around landmarks to select. Selected landmarks will be colored yellow. Then type into the console a letter (e.g. 1, 2, 3...) to assign selected landmark(s) to this module. Repeat until all landmarks are assigned to modules.

See Also

modularity.test and integration.test

rgl-package (used in 3D plotting)