Learn R Programming

Momocs (version 0.2-6)

pca2shp: From a factorial map to a shape.

Description

Converts a position in a factorial map to a shape. This function is used internally but might be interesting for a direct used on a PCA calculated on a matrix of harmonic coefficients.

Usage

pca2shp(pos, rot, mean.shp, method = c("efourier", "rfourier",
                 "tfourier"), scale = 1, amp = 1, trans = TRUE, nb.pts
                 = 64, rotate.shp)

Arguments

pos
A vector of positions on a given PC axis.
rot
A vector of multiplying values corresponding to the PC axis passed to pos.
mean.shp
A vector of harmonic coefficients corresponding to the mean shape.
method
A character, either "efourier", "rfourier" or "tfourier" (partial matches are allowed) to use to calculate morphological space.
scale
numeric. To scale the shape returned.
amp
numeric. To amplify the amplitude of the deformation.
trans
logical. Whether to translate of not the coordinate of the shape reconstructed according to pos.
nb.pts
numeirc. The number of points to use for reconstructed shapes.
rotate.shp
numeric. If specified, the angles (in radians) to rotate shapes plotted.

Value

  • Returns a list of coordinates.

Examples

Run this code
data(bot)

Run the code above in your browser using DataLab