Learn R Programming

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

Momocs (version 1.3.2)

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 morphometrics 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

538

Version

1.3.2

License

GPL-2 | GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Vincent Bonhomme

Last Published

October 6th, 2020

Functions in Momocs (1.3.2)

KMEDOIDS

KMEDOIDS
MANOVA_PW

Pairwise Multivariate analyses of variance
MDS

(Metric) multidimensional scaling
Ptolemy

Ptolemaic ellipses and illustration of efourier
OpnCoe

Builds an OpnCoe object
calibrate_deviations

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

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

Builds an Out object
LDA

Linear Discriminant Analysis on Coe objects
OutCoe

Builds an OutCoe object
coeff_sel

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

Shape variation along PC axes
boxplot.PCA

Boxplot on PCA objects
coo_center

Centers coordinates
coo_calliper

Calculates the calliper length
PCA

Principal component analysis on Coe objects
coo_likely_clockwise

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

Closes/uncloses shapes
coo_centdist

Returns the distance between everypoints and the centroid
pix2chc

Convert (x; y) coordinates to chaincoded coordinates
at_least

Retain groups with at least n shapes
coo_ldk

Defines landmarks interactively
coeff_rearrange

Rearrange a matrix of (typically Fourier) coefficients
coo_align

Aligns coordinates
complex

Convert complex to/from cartesian coordinates
MSHAPES

Mean shape calculation for Coo, Coe, etc.
CLUST

Hierarchical clustering
coo_aligncalliper

Aligns shapes along their 'calliper length'
coo_extract

Extract coordinates from a shape
Coe

Coe "super" class
coo_centpos

Calculate centroid coordinates
coo_draw

Adds a shape to the current plot
coo_plot

Plots a single shape
bezier

Calculates Bezier coefficients from a shape
coo_convexity

Calculates the convexity of a shape
coeff_split

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

Calculates a shape from Bezier coefficients
Ldk

Builds an Ldk object
coo_sample_prop

Sample a proportion of coordinates (among points)
color_palettes

Some color palettes
coo_down

coo_down Retains coordinates with negative y-coordinates
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_left

Retains coordinates with negative x-coordinates
coo_slidedirection

Slides coordinates in a particular direction
boxplot.OutCoe

Boxplot of morphometric coefficients
coo_alignminradius

Aligns shapes using their shortest radius
coo_rotate

Rotates coordinates
trilo

Data: Outline coordinates of cephalic outlines of trilobite
calibrate_r2

Quantitative r2 calibration for Opn objects
coo_boundingbox

Calculates coordinates of the bounding box
classification_metrics

Calculate classification metrics on a confusion matrix
coo_slide

Slides coordinates
coo_range

Calculate coordinates range
layers

grindr layers for multivariate plots
coo_bookstein

Register Bookstein's coordinates
coo_perim

Calculates perimeter and variations
calibrate_reconstructions

Calibrate using reconstructed shapes
coo_chull

Calculates the (recursive) convex hull of a shape
Coo

Coo "super" class
coo_eccentricity

Calculates the eccentricity of a shape
coo_elongation

Calculates the elongation of a shape
coo_length

Calculates the length of a shape
img_plot

Plots a .jpg image
coo_angle_tangent

Calculates the tangent angle along the perimeter of a shape
coo_centsize

Calculates centroid size
coo_area

Calculates the area of a shape
coo_check

Checks shapes
coo_trimbottom

Trims bottom coordinates from shape
fgsProcrustes

Full Generalized Procrustes alignment between shapes with sliding landmarks
coo_is_closed

Test if shapes are closed
coo_truss

Truss measurement
coo_oscillo

Momocs' 'oscilloscope' for Fourier-based approaches
coo_flipx

Flips shapes
coo_smooth

Smoothes coordinates
coo_circularity

Calculates the Haralick's circularity of a shape
edm_nearest

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

Plots sets of shapes.
coo_jitter

Jitters shapes
flower

Data: Measurement of iris flowers
coo_ruban

Plots differences as (colored) segments aka a ruban
drawers

grindr drawers for shape plots
coo_rotatecenter

Rotates shapes with a custom center
bot

Data: Outline coordinates of beer and whisky bottles.
coo_samplerr

Samples coordinates (regular radius)
coo_sample

Sample coordinates (among points)
export

Exports Coe objects and shapes
Momocs

Momocs
coo_lolli

Plots (lollipop) differences between two configurations
get_pairs

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

Turn Momocs objects into tydy data_frames
import_jpg

Extract outline coordinates from multiple .jpg files
coo_rev

Reverses coordinates
coo_trimtop

Trims top coordinates from shape
def_ldk_tips

Define tips as new landmarks
chop

Split to several objects based on a factor
MANOVA

Multivariate analysis of (co)variance on Coe objects
TraCoe

Traditional morphometrics class
coo_rectangularity

Calculates the rectangularity of a shape
coo_interpolate

Interpolates coordinates
import_jpg1

Extract outline coordinates from a single .jpg file
coo_rectilinearity

Calculates the rectilinearity of a shape
coo_slidegap

Slides coordinates using the widest gap
coo_angle_edges

Calculates the angle of every edge of a shape
coo_arrows

Plots (lollipop) differences between two configurations
add_ldk

Adds new landmarks on Out and Opn objects
coo_smoothcurve

Smoothes coordinates on curves
harm_pow

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

Aligns shapes along the x-axis
coo_up

Retains coordinates with positive y-coordinates
rfourier_i

Inverse radii variation Fourier transform
nsfishes

Data: Outline coordinates of North Sea fishes
coo_right

Retains coordinates with positive x-coordinates
Opn

Builds an Opn object
breed

Jitters Coe (and others) objects
charring

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

Calculates the width of a shape
wings

Data: Landmarks coordinates of mosquito wings
efourier_i

Inverse elliptical Fourier transform
chaff

Data: Landmark and semilandmark coordinates on cereal glumes
efourier

Elliptical Fourier transform (and its normalization)
def_links

Defines links between landmarks
coo_untiltx

Removes rotation so that the centroid and a given point are parallel to the x-axis
get_slidings

Extracts sliding landmarks coordinates
coo_scale

Scales coordinates
ldk_contour

Draws kernel density contours around landmark
edm

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

Register new baselines
coo_lw

Calculates length and width of a shape
coo_nb

Counts coordinates
coo_scalars

Calculates all scalar descriptors of shape
reexports

Objects exported from other packages
coo_trans

Translates coordinates
dissolve

Dissolve Coe objects
sfourier_i

Inverse radii variation Fourier transform
KMEANS

KMEANS on PCA objects
mouse

Data: Outline coordinates of mouse molars
coo_solidity

Calculates the solidity of a shape
mosquito

Data: Outline coordinates of mosquito wings.
rename

Rename columns by name
d

A wrapper to calculates euclidean distances between two points
apodemus

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

Removes harmonics from Coe objects
arrange

Arrange rows by variables
NMDS

Non metric multidimensional scaling
coo_trim

Trims both ends coordinates from shape
lf_structure

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

Calculates and draws 'dfourier' shapes
molars

Data: Outline coordinates of 360 molars
palettes

Color palettes
olea

Data: Outline coordinates of olive seeds open outlines.
oak

Data: Configuration of landmarks of oak leaves
import_txt

Import coordinates from a .txt file
tie_jpg_txt

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

Calculate natural polynomial fits on open outlines
fgProcrustes

Full Generalized Procrustes alignment between shapes
hearts

Data: Outline coordinates of hand-drawn hearts
links_delaunay

Creates links (Delaunay triangulation) between landmarks
dfourier_i

Investe discrete cosinus transform
shapes

Data: Outline coordinates of various shapes
combine

Combine several objects
rfourier_shape

Calculates and draw 'rfourier' shapes.
sfourier

Radii variation Fourier transform (equally spaced curvilinear abscissa)
bridges

Convert between different classes
col_transp

Transparency helpers and palettes
coo_dxy

Calculate abscissa and ordinate on a shape
def_ldk

Defines new landmarks on Out and Opn objects
efourier_shape

Calculates and draw 'efourier' shapes.
measure

Measures shape descriptors
coo_tac

Calculates the total absolute curvature of a shape
ed

Calculates euclidean distance between two points.
papers

grindr papers for shape plots
edi

Calculates euclidean intermediate between two points.
import_Conte

Extract outlines coordinates from an image silhouette
import_StereoMorph_curve1

Import files creates by StereoMorph into Momocs
perm

Permutes and breed Coe (and others) objects
filter

Subset based on conditions
coo_draw_rads

Draw radii to the current plot
inspect

Graphical inspection of shapes
coo_shearx

Shears shapes
coo_force2close

Forces shapes to close
stack

Family picture of shapes
coo_template

'Templates' shapes
fac_dispatcher

Brew and serve fac from Momocs object
layers_morphospace

Morphospace layers
mutate

Add new variables
ldk_check

Checks 'ldk' shapes
coo_slice

Slices shapes between successive coordinates
flip_PCaxes

Flips PCA axes
is

Class and component testers
hcontrib

Harmonic contribution to shape
ldk_confell

Draws confidence ellipses for landmark positions
tfourier_i

Inverse tangent angle Fourier transform
links_all

Creates links (all pairwise combinations) between landmarks
plot_silhouette

Silhouette plot
plot.PCA

Plots Principal Component Analysis
tps2d

Thin Plate Splines for 2D data
panel

Family picture of shapes
ldk_chull

Draws convex hulls around landmark positions
plot.LDA

Plots Linear Discriminant Analysis
plot_table

Plots confusion matrix of sample sizes within $fac
morphospace_positions

Calculates nice positions on a plane for drawing shapes
slice

Subset based on positions
rm_missing

Remove shapes with missing data in fac
plot_CV

Plots a cross-validation table as an heatmap
slidings_scheme

Extracts partitions of sliding coordinates
rm_uncomplete

Remove shapes with incomplete slices
is_equallyspacedradii

Tests if coordinates likely have equally spaced radii
plot_NMDS

NMDS plot unsing grindr layers
plot_MSHAPES

Pairwise comparison of a list of shapes
symmetry

Calcuates symmetry indices on OutCoe objects
opoly

Calculate orthogonal polynomial fits on open outlines
rePCA

"Redo" a PCA on a new Coe
plot_PCA

PCA plot using grindr layers
pProcrustes

Partial Procrustes alignment between two shapes
plot_devsegments

Draws colored segments from a matrix of coordinates.
rearrange_ldk

Rearrange, (select and reorder) landmarks to retain
rfourier

Radii variation Fourier transform (equally spaced radii)
pile

Graphical pile of shapes
plot_CV2

Plots a cross-correlation table
rescale

Rescale coordinates from pixels to real length units
fProcrustes

Full Procrustes alignment between two shapes
scree

How many axes to retain this much of variance or trace ?
sample_n

Sample n shapes
plot_LDA

LDA plot using grindr layers
tps_iso

Deformation isolines using Thin Plate Splines.
sfourier_shape

Calculates and draw 'sfourier' shapes.
tps_raw

Vanilla Thin Plate Splines
opoly_i

Calculates shape from a polynomial model
verify

Validates Coo objects
which_out

Identify outliers
reLDA

"Redo" a LDA on new data
def_ldk_angle

Add new landmarks based on angular positions
mosaic_engine

Plots mosaics of shapes.
rm_asym

Removes asymmetric and symmetric variation on OutCoe objects
select

Select columns by name
tfourier_shape

Calculates and draws 'tfourier' shapes.
dfourier

Discrete cosinus transform
tfourier

Tangent angle Fourier transform
def_slidings

Defines sliding landmarks matrix
tps_arr

Deformation 'vector field' using Thin Plate Splines
get_chull_area

Calculates convex hull area/volume of PCA scores
get_ldk

Retrieves landmarks coordinates
import_tps

Import a tps file
sample_frac

Sample a fraction of shapes
ldk_labels

Add landmarks labels
ldk_links

Draws links between landmarks
rw_fac

Renames levels on Momocs objects
subsetize

Subsetize various Momocs objects
tps_grid

Deformation grids using Thin Plate Splines