Learn R Programming

Momocs (version 0.1-03)

Utilities: coeff.sel: Selection of harmonic coefficients.

Description

Harmonic coefficients are arranged in the @coeff slot of Nef-objects in that way: $$A_1, \dots, A_n, B_1, \dots, B_n, C_1, \dots, C_n, D_1, \dots, D-n$$. coeff.sel helps to select a given number of harmonics and coeff.split returns a named list of coordinates.

Usage

coeff.sel(retain = 8, drop = 0, nb.h = 32, cph = 4)
coeff.split(cs, nb.h = 8, cph = 4)

Arguments

cs
A vector of harmonic coefficients.
retain
numeric. The number of harmonics to retain.
drop
numeric. The number of harmonics to drop
nb.h
numeric. The maximum harmonic rank.
cph
numeric. The number of coefficients per harmonic.

Value

  • coeff.sel returns indices that can be used to select columns from an harmonic coefficient matrix. coeff.split returns a named list of coordinates.

Examples

Run this code
coeff.sel(retain=8, drop=0, nb.h=24)
coeff.sel(retain=8, drop=0, nb.h=24, cph=2) # for tangent angle / radius variation matrices.
coeff.split(1:128, nb.h=32, cph=4)

Run the code above in your browser using DataLab