Learn R Programming

⚠️There's a newer version (1.4.1) of this package.Take me there.

Momocs (version 1.2.9)

Morphometrics using R

Description

The goal of Momocs is to provide a complete, convenient, reproducible and open-source toolkit for 2D morphometrics. It includes most common 2D morphometrics approaches on outlines, open outlines, configurations of landmarks, traditional morphometrics, and facilities for data preparation, manipulation and visualization with a consistent grammar throughout. It allows reproducible, complex morphometric analyses and other morphometrics approaches should be easy to plug in, or develop from, on top of this canvas.

Copy Link

Version

Install

install.packages('Momocs')

Monthly Downloads

653

Version

1.2.9

License

GPL-2 | GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Vincent Bonhomme

Last Published

March 22nd, 2018

Functions in Momocs (1.2.9)

CLUST

Hierarchical clustering
KMEANS

KMEANS on PCA objects
Coo

Coo "super" class
MANOVA

Multivariate analysis of (co)variance on Coe objects
Coe

Coe "super" class
Momocs_help

Browse Momocs online doc
Ldk

Builds an Ldk object
Momocs

Momocs
LDA

Linear Discriminant Analysis on Coe objects
TraCoe

Traditional morphometrics class
PCcontrib

Shape variation along PC axes
MANOVA_PW

Pairwise Multivariate analyses of variance
add_ldk

Adds new landmarks on Out and Opn objects
Momocs_version

Install last version of Momocs
as_df

Converts Momocs objects to data.frames
Ptolemy

Ptolemaic ellipses and illustration of efourier
Opn

Builds an Opn object
at_least

Retain groups with at least n shapes
pix2chc

Convert (x; y) coordinates to chaincoded coordinates
boxplot.PCA

Boxplot on PCA objects
OutCoe

Builds an OutCoe object
bezier

Calculates Bezier coefficients from a shape
breed

Jitters Coe (and others) objects
PCA

Principal component analysis on Coe objects
OpnCoe

Builds an OpnCoe object
calibrate_harmonicpower

Quantitative calibration, through harmonic power, for Out and Opn objects
calibrate_reconstructions

Calibrate using reconstructed shapes
Out

Builds an Out object
andnow

And now, what to do?
calibrate_r2

Quantitative r2 calibration for Opn objects
chop

Split to several objects based on a factor
bezier_i

Calculates a shape from Bezier coefficients
arrange

Arrange rows by variables
boxplot.OutCoe

Boxplot of morphometric coefficients
coeff_sel

Helps to select a given number of harmonics from a numerical vector.
bridges

Convert between different classes
calibrate_deviations

Quantitative calibration, through deviations, for Out and Opn objects
coeff_split

Converts a numerical description of harmonic coefficients to a named list.
coo_angle_edge1

Calculate the angle formed by three (x; y) coordinates
classification_metrics

Calculate classification metrics on a confusion matrix
coo_align

Aligns coordinates
coeff_rearrange

Rearrange a matrix of (typically Fourier) coefficients
col_transp

Transparency helpers and palettes
coo_alignminradius

Aligns shapes using their shortest radius
coo_aligncalliper

Aligns shapes along their 'calliper length'
color_palettes

Some color palettes
coo_alignxax

Aligns shapes along the x-axis
coo_angle_edges

Calculates the angle of every edge of a shape
combine

Combine several objects
coo_baseline

Register new baselines
coo_angle_tangent

Calculates the tangent angle along the perimeter of a shape
coo_centpos

Calculate centroid coordinates
coo_bookstein

Register Bookstein's coordinates
coo_arrows

Plots (lollipop) differences between two configurations
complex

Convert complex to/from cartesian coordinates
coo_area

Calculates the area of a shape
coo_calliper

Calculates the calliper length
coo_boundingbox

Calculates coordinates of the bounding box
coo_centdist

Returns the distance between everypoints and the centroid
coo_close

Closes/uncloses shapes
coo_chull

Calculates the (recursive) convex hull of a shape
coo_check

Checks shapes
coo_center

Centers coordinates
coo_draw_rads

Draw radii to the current plot
coo_circularity

Calculates the Haralick's circularity of a shape
coo_centsize

Calculates centroid size
coo_down

coo_down Retains coordinates with negative y-coordinates
coo_dxy

Calculate abscissa and ordinate on a shape
coo_elongation

Calculates the elongation of a shape
coo_eccentricity

Calculates the eccentricity of a shape
coo_draw

Adds a shape to the current plot
coo_convexity

Calculates the convexity of a shape
coo_intersect_angle

Nearest intersection between a shape and a segment specified with an angle
coo_intersect_segment

Nearest intersection between a shape and a segment
coo_is_closed

Test if shapes are closed
coo_force2close

Forces shapes to close
coo_extract

Extract coordinates from a shape
coo_jitter

Jitters shapes
coo_interpolate

Interpolates coordinates
coo_flipx

Flips shapes
coo_oscillo

Momocs' 'oscilloscope' for Fourier-based approaches
coo_lw

Calculates length and width of a shape
coo_likely_clockwise

Tests if shapes are (likely) developping clockwise or anticlockwise
coo_nb

Counts coordinates
coo_rotatecenter

Rotates shapes with a custom center
coo_length

Calculates the length of a shape
coo_listpanel

Plots sets of shapes.
coo_perim

Calculates perimeter and variations
coo_ruban

Plots differences as (colored) segments aka a ruban
coo_ldk

Defines landmarks interactively
coo_range

Calculate coordinates range
coo_lolli

Plots (lollipop) differences between two configurations
coo_left

Retains coordinates with negative x-coordinates
coo_rectangularity

Calculates the rectangularity of a shape
coo_sample

Sample coordinates (among points)
coo_right

Retains coordinates with positive x-coordinates
coo_rotate

Rotates coordinates
coo_rectilinearity

Calculates the rectilinearity of a shape
coo_rev

Reverses coordinates
coo_plot

Plots a single shape
coo_slidedirection

Slides coordinates in a particular direction
coo_slide

Slides coordinates
coo_slice

Slices shapes between successive coordinates
coo_smooth

Smoothes coordinates
coo_slidegap

Slides coordinates using the widest gap
coo_samplerr

Samples coordinates (regular radius)
coo_smoothcurve

Smoothes coordinates on curves
coo_shearx

Shears shapes
coo_scale

Scales coordinates
coo_width

Calculates the width of a shape
coo_sample_prop

Sample a proportion of coordinates (among points)
d

A wrapper to calculates euclidean distances between two points
coo_truss

Truss measurement
coo_up

Retains coordinates with positive y-coordinates
coo_trans

Translates coordinates
chaff

Data: Landmark and semilandmark coordinates on cereal glumes
coo_trim

Trims both ends coordinates from shape
charring

Data: Outline coordinates from an experimental charring on cereal grains
coo_trimbottom

Trims bottom coordinates from shape
molars

Data: Outline coordinates of 360 molars
coo_trimtop

Trims top coordinates from shape
coo_template

'Templates' shapes
shapes

Data: Outline coordinates of various shapes
mosquito

Data: Outline coordinates of mosquito wings.
trilo

Data: Outline coordinates of cephalic outlines of trilobite
coo_solidity

Calculates the solidity of a shape
oak

Data: Configuration of landmarks of oak leaves
olea

Data: Outline coordinates of olive seeds open outlines.
hearts

Data: Outline coordinates of hand-drawn hearts
drawers

grindr drawers for shape plots
def_links

Defines links between landmarks
ed

Calculates euclidean distance between two points.
mouse

Data: Outline coordinates of mouse molars
wings

Data: Landmarks coordinates of mosquito wings
def_slidings

Defines sliding landmarks matrix
nsfishes

Data: Outline coordinates of North Sea fishes
def_ldk

Defines new landmarks on Out and Opn objects
fac_dispatcher

Brew and serve fac from Momocs object
flower

Data: Measurement of iris flowers
def_ldk_angle

Add new landmarks based on angular positions
fgProcrustes

Full Generalized Procrustes alignment between shapes
apodemus

Data: Outline coordinates of Apodemus (wood mouse) mandibles
dfourier

Discrete cosinus transform
def_ldk_tips

Define tips as new landmarks
bot

Data: Outline coordinates of beer and whisky bottles.
dfourier_i

Investe discrete cosinus transform
edi

Calculates euclidean intermediate between two points.
dfourier_shape

Calculates and draws 'dfourier' shapes
efourier_i

Inverse elliptical Fourier transform
edm_nearest

Calculates the shortest euclidean distance found for every point of one matrix among those of a second.
edm

Calculates euclidean distance every pairs of points in two matrices.
efourier_shape

Calculates and draw 'efourier' shapes.
dissolve

Dissolve Coe objects
get_slidings

Extracts sliding landmarks coordinates
export

Exports Coe objects and shapes
efourier

Elliptical Fourier transform (and its normalization)
flip_PCaxes

Flips PCA axes
hcontrib

Harmonic contribution to shape
fProcrustes

Full Procrustes alignment between two shapes
fgsProcrustes

Full Generalized Procrustes alignment between shapes with sliding landmarks
get_chull_area

Calculates convex hull area/volume of PCA scores
get_ldk

Retrieves landmarks coordinates
layers

grindr layers for multivariate plots
filter

Subset based on conditions
import_jpg1

Extract outline coordinates from a single .jpg file
get_pairs

Get paired individual on a Coe, PCA or LDA objects
ldk_contour

Draws kernel density contours around landmark
harm_pow

Calculates harmonic power given a list from e/t/rfourier
import_StereoMorph_curve1

Import files creates by StereoMorph into Momocs
import_tps

Import a tps file
import_jpg

Extract outline coordinates from multiple .jpg files
ldk_labels

Add landmarks labels
hist.OutCoe

Histogram of morphometric coefficients
img_plot

Plots a .jpg image
import_txt

Import coordinates from a .txt file
ldk_check

Checks 'ldk' shapes
ldk_chull

Draws convex hulls around landmark positions
import_Conte

Extract outlines coordinates from an image silhouette
inspect

Graphical inspection of shapes
measure

Measures shape descriptors
ldk_confell

Draws confidence ellipses for landmark positions
ldk_links

Draws links between landmarks
morphospace_positions

Calculates nice positions on a plane for drawing shapes
is

Class and component testers
pile

Graphical pile of shapes
lf_structure

bind_db.Coe <- bind_db.Coo Extracts structure from filenames
mosaic_engine

Plots mosaics of shapes.
is_equallyspacedradii

Tests if coordinates likely have equally spaced radii
plot.LDA

Plots Linear Discriminant Analysis
mutate

Add new variables
mshapes

Mean shape calculation for Coo, Coe, etc.
links_all

Creates links (all pairwise combinations) between landmarks
plot_devsegments

Draws colored segments from a matrix of coordinates.
npoly

Calculate natural polynomial fits on open outlines
palettes

Color palettes
plot_mshapes

Pairwise comparison of a list of shapes
rm_uncomplete

Remove shapes with incomplete slices
links_delaunay

Creates links (Delaunay triangulation) between landmarks
plot.PCA

Plots Principal Component Analysis
papers

grindr papers for shape plots
rw_fac

Renames levels on Momocs objects
plot_CV

Plots a cross-validation table as an heatmap
panel

Family picture of shapes
rescale

Rescale coordinates from pixels to real length units
perm

Permutes and breed Coe (and others) objects
rfourier_i

Inverse radii variation Fourier transform
rfourier

Radii variation Fourier transform (equally spaced radii)
rfourier_shape

Calculates and draw 'rfourier' shapes.
reLDA

"Redo" a LDA on new data
slidings_scheme

Extracts partitions of sliding coordinates
opoly

Calculate orthogonal polynomial fits on open outlines
sample_frac

Sample a fraction of shapes
sample_n

Sample n shapes
rePCA

"Redo" a PCA on a new Coe
stack

Family picture of shapes
pProcrustes

Partial Procrustes alignment between two shapes
tie_jpg_txt

Binds .jpg outlines from .txt landmarks taken on them
tfourier_i

Inverse tangent angle Fourier transform
plot_CV2

Plots a cross-correlation table
tps2d

Thin Plate Splines for 2D data
plot_table

Plots confusion matrix of sample sizes within $fac
plot_PCA

Multivariate plots using grindr layers
tfourier_shape

Calculates and draws 'tfourier' shapes.
validate

Validates Coo objects
opoly_i

Calculates shape from a polynomial model
rearrange_ldk

Rearrange, (select and reorder) landmarks to retain
tps_arr

Deformation 'vector field' using Thin Plate Splines
which_out

Identify outliers
rm_asym

Removes asymmetric and symmetric variation on OutCoe objects
reexports

Objects exported from other packages
tps_grid

Deformation grids using Thin Plate Splines
rm_harm

Removes harmonics from Coe objects
sfourier_shape

Calculates and draw 'sfourier' shapes.
sfourier

Radii variation Fourier transform (equally spaced curvilinear abscissa)
slice

Subset based on positions
sfourier_i

Inverse radii variation Fourier transform
scree

Methods for PCA eigen values
symmetry

Calcuates symmetry indices on OutCoe objects
select

Select and rename columns by name
tfourier

Tangent angle Fourier transform
tps_iso

Deformation isolines using Thin Plate Splines.
tps_raw

Vanilla Thin Plate Splines