Learn R Programming

Momocs (version 1.4.1)

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

740

Version

1.4.1

License

GPL-2 | GPL-3

Issues

Pull Requests

Stars

Forks

Last Published

November 13th, 2023

Functions in Momocs (1.4.1)

MSHAPES

Mean shape calculation for Coo, Coe, etc.
Momocs

Momocs
boxplot.PCA

Boxplot on PCA objects
boxplot.OutCoe

Boxplot of morphometric coefficients
bezier

Calculates Bezier coefficients from a shape
arrange

Arrange rows by variables
MDS

(Metric) multidimensional scaling
as_df

Turn Momocs objects into tydy data_frames
coo_angle_edges

Calculates the angle of every edge of a shape
coeff_sel

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

Calculates a shape from Bezier coefficients
coo_alignxax

Aligns shapes along the x-axis
PCA

Principal component analysis on Coe objects
calibrate_deviations

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

Rearrange a matrix of (typically Fourier) coefficients
OutCoe

Builds an OutCoe object
combine

Combine several objects
col_transp

Transparency helpers and palettes
Ptolemy

Ptolemaic ellipses and illustration of efourier
coo_calliper

Calculates the calliper length
calibrate_harmonicpower

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

Traditional morphometrics class
calibrate_r2

Quantitative r2 calibration for Opn objects
MANOVA

Multivariate analysis of (co)variance on Coe objects
Ldk

Builds an Ldk object
coo_aligncalliper

Aligns shapes along their 'calliper length'
calibrate_reconstructions

Calibrate using reconstructed shapes
add_ldk

Adds new landmarks on Out and Opn objects
NMDS

Non metric multidimensional scaling
Opn

Builds an Opn object
coo_alignminradius

Aligns shapes using their shortest radius
OpnCoe

Builds an OpnCoe object
at_least

Retain groups with at least n shapes
Out

Builds an Out object
coo_centdist

Returns the distance between everypoints and the centroid
pix2chc

Convert (x; y) coordinates to chaincoded coordinates
coo_align

Aligns coordinates
complex

Convert complex to/from cartesian coordinates
chop

Split to several objects based on a factor
coo_centpos

Calculate centroid coordinates
coo_center

Centers coordinates
classification_metrics

Calculate classification metrics on a confusion matrix
coo_convexity

Calculates the convexity of a shape
coo_force2close

Forces shapes to close
coo_interpolate

Interpolates coordinates
coo_close

Closes/uncloses shapes
coo_eccentricity

Calculates the eccentricity of a shape
coo_elongation

Calculates the elongation of a shape
coo_length

Calculates the length of a shape
coo_baseline

Register new baselines
coo_arrows

Plots (lollipop) differences between two configurations
coo_bookstein

Register Bookstein's coordinates
coo_draw_rads

Draw radii to the current plot
coo_dxy

Calculate abscissa and ordinate on a shape
coo_is_closed

Test if shapes are closed
coo_boundingbox

Calculates coordinates of the bounding box
coo_listpanel

Plots sets of shapes.
coo_lolli

Plots (lollipop) differences between two configurations
coo_centsize

Calculates centroid size
coo_check

Checks shapes
coo_likely_clockwise

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

Plots differences as (colored) segments aka a ruban
bridges

Convert between different classes
breed

Jitters Coe (and others) objects
coeff_split

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

Adds a shape to the current plot
coo_angle_tangent

Calculates the tangent angle along the perimeter of a shape
coo_down

coo_down Retains coordinates with negative y-coordinates
color_palettes

Some color palettes
coo_area

Calculates the area of a shape
coo_extract

Extract coordinates from a shape
coo_intersect_angle

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

Flips shapes
coo_ldk

Defines landmarks interactively
coo_oscillo

Momocs' 'oscilloscope' for Fourier-based approaches
coo_jitter

Jitters shapes
coo_perim

Calculates perimeter and variations
coo_sample

Sample coordinates (among points)
coo_scalars

Calculates all scalar descriptors of shape
coo_rotate

Rotates coordinates
coo_untiltx

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

Slides coordinates
coo_truss

Truss measurement
coo_rotatecenter

Rotates shapes with a custom center
coo_slidedirection

Slides coordinates in a particular direction
coo_plot

Plots a single shape
coo_intersect_segment

Nearest intersection between a shape and a segment
coo_range

Calculate coordinates range
coo_up

Retains coordinates with positive y-coordinates
coo_width

Calculates the width of a shape
coo_nb

Counts coordinates
coo_lw

Calculates length and width of a shape
coo_samplerr

Samples coordinates (regular radius)
coo_sample_prop

Sample a proportion of coordinates (among points)
coo_scale

Scales coordinates
coo_chull

Calculates the (recursive) convex hull of a shape
coo_rectilinearity

Calculates the rectilinearity of a shape
coo_rectangularity

Calculates the rectangularity of a shape
coo_shearx

Shears shapes
coo_slice

Slices shapes between successive coordinates
coo_circularity

Calculates the Haralick's circularity of a shape
ed

Calculates euclidean distance between two points.
edi

Calculates euclidean intermediate between two points.
mosquito

Data: Outline coordinates of mosquito wings.
drawers

grindr drawers for shape plots
dissolve

Dissolve Coe objects
mouse

Data: Outline coordinates of mouse molars
nsfishes

Data: Outline coordinates of North Sea fishes
coo_template

'Templates' shapes
chaff

Data: Landmark and semilandmark coordinates on cereal glumes
coo_tac

Calculates the total absolute curvature of a shape
bot

Data: Outline coordinates of beer and whisky bottles.
coo_rev

Reverses coordinates
coo_left

Retains coordinates with negative x-coordinates
coo_trans

Translates coordinates
coo_trim

Trims both ends coordinates from shape
coo_smoothcurve

Smoothes coordinates on curves
img_plot

Plots a .jpg image
hearts

Data: Outline coordinates of hand-drawn hearts
shapes

Data: Outline coordinates of various shapes
olea

Data: Outline coordinates of olive seeds open outlines.
coo_solidity

Calculates the solidity of a shape
molars

Data: Outline coordinates of 360 molars
oak

Data: Configuration of landmarks of oak leaves
fProcrustes

Full Procrustes alignment between two shapes
d

A wrapper to calculates euclidean distances between two points
import_Conte

Extract outlines coordinates from an image silhouette
fac_dispatcher

Brew and serve fac from Momocs object
efourier_i

Inverse elliptical Fourier transform
hcontrib

Harmonic contribution to shape
dfourier_shape

Calculates and draws 'dfourier' shapes
efourier

Elliptical Fourier transform (and its normalization)
is

Class and component testers
fgsProcrustes

Full Generalized Procrustes alignment between shapes with sliding landmarks
dfourier_i

Investe discrete cosinus transform
harm_pow

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

Measures shape descriptors
is_equallyspacedradii

Tests if coordinates likely have equally spaced radii
fgProcrustes

Full Generalized Procrustes alignment between shapes
get_chull_area

Calculates convex hull area/volume of PCA scores
coo_right

Retains coordinates with positive x-coordinates
links_delaunay

Creates links (Delaunay triangulation) between landmarks
get_ldk

Retrieves landmarks coordinates
inspect

Graphical inspection of shapes
ldk_check

Checks 'ldk' shapes
import_txt

Import coordinates from a .txt file
ldk_chull

Draws convex hulls around landmark positions
coo_slidegap

Slides coordinates using the widest gap
get_pairs

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

Defines sliding landmarks matrix
coo_trimtop

Trims top coordinates from shape
trilo

Data: Outline coordinates of cephalic outlines of trilobite
mutate

Add new variables
charring

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

Data: Landmarks coordinates of mosquito wings
coo_trimbottom

Trims bottom coordinates from shape
coo_smooth

Smoothes coordinates
flower

Data: Measurement of iris flowers
def_ldk_angle

Add new landmarks based on angular positions
apodemus

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

Defines new landmarks on Out and Opn objects
npoly

Calculate natural polynomial fits on open outlines
plot_NMDS

NMDS plot unsing grindr layers
dfourier

Discrete cosinus transform
plot_MSHAPES

Pairwise comparison of a list of shapes
ldk_confell

Draws confidence ellipses for landmark positions
ldk_contour

Draws kernel density contours around landmark
palettes

Color palettes
panel

Family picture of shapes
def_ldk_tips

Define tips as new landmarks
plot_silhouette

Silhouette plot
def_links

Defines links between landmarks
edm

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

LDA plot using grindr layers
plot_CV2

Plots a cross-correlation table
plot_PCA

PCA plot using grindr layers
layers

grindr layers for multivariate plots
export

Exports Coe objects and shapes
mosaic_engine

Plots mosaics of shapes.
morphospace_positions

Calculates nice positions on a plane for drawing shapes
efourier_shape

Calculates and draw 'efourier' shapes.
layers_morphospace

Morphospace layers
rfourier_i

Inverse radii variation Fourier transform
import_jpg

Extract outline coordinates from multiple .jpg files
reLDA

"Redo" a LDA on new data
opoly_i

Calculates shape from a polynomial model
rfourier_shape

Calculates and draw 'rfourier' shapes.
get_slidings

Extracts sliding landmarks coordinates
import_StereoMorph_curve1

Import files creates by StereoMorph into Momocs
lf_structure

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

grindr papers for shape plots
links_all

Creates links (all pairwise combinations) between landmarks
edm_nearest

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

Draws colored segments from a matrix of coordinates.
plot_table

Plots confusion matrix of sample sizes within $fac
perm

Permutes and breed Coe (and others) objects
reexports

Objects exported from other packages
sample_frac

Sample a fraction of shapes
rw_fac

Renames levels on Momocs objects
rename

Rename columns by name
plot.LDA

Plots Linear Discriminant Analysis
pile

Graphical pile of shapes
rfourier

Radii variation Fourier transform (equally spaced radii)
rm_asym

Removes asymmetric and symmetric variation on OutCoe objects
stack

Family picture of shapes
subsetize

Subsetize various Momocs objects
rescale

Rescale coordinates from pixels to real length units
tps_arr

Deformation 'vector field' using Thin Plate Splines
tps_grid

Deformation grids using Thin Plate Splines
rm_missing

Remove shapes with missing data in fac
rm_uncomplete

Remove shapes with incomplete slices
filter

Subset based on conditions
rm_harm

Removes harmonics from Coe objects
slice

Subset based on positions
flip_PCaxes

Flips PCA axes
slidings_scheme

Extracts partitions of sliding coordinates
select

Select columns by name
import_tps

Import a tps file
import_jpg1

Extract outline coordinates from a single .jpg file
tie_jpg_txt

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

Thin Plate Splines for 2D data
ldk_links

Draws links between landmarks
ldk_labels

Add landmarks labels
scree

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

Sample n shapes
plot.PCA

Plots Principal Component Analysis
opoly

Calculate orthogonal polynomial fits on open outlines
pProcrustes

Partial Procrustes alignment between two shapes
sfourier

Radii variation Fourier transform (equally spaced curvilinear abscissa)
plot_CV

Plots a cross-validation table as an heatmap
sfourier_i

Inverse radii variation Fourier transform
rearrange_ldk

Rearrange, (select and reorder) landmarks to retain
sfourier_shape

Calculates and draw 'sfourier' shapes.
tfourier_shape

Calculates and draws 'tfourier' shapes.
tfourier_i

Inverse tangent angle Fourier transform
rePCA

"Redo" a PCA on a new Coe
symmetry

Calcuates symmetry indices on OutCoe objects
tfourier

Tangent angle Fourier transform
verify

Validates Coo objects
tps_iso

Deformation isolines using Thin Plate Splines.
which_out

Identify outliers
tps_raw

Vanilla Thin Plate Splines
Coe

Coe "super" class
Coo

Coo "super" class
KMEDOIDS

KMEDOIDS
CLUST

Hierarchical clustering
LDA

Linear Discriminant Analysis on Coe objects
MANOVA_PW

Pairwise Multivariate analyses of variance
KMEANS

KMEANS on PCA objects
PCcontrib

Shape variation along PC axes