Learn R Programming

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

Momocs (version 1.1.6)

Morphometrics using R

Description

A complete toolkit for morphometrics, from data extraction to multivariate analyses. Most common 2D morphometrics approaches are included: outlines, open outlines, configurations of landmarks, traditional morphometrics, and facilities for data preparation, manipulation and visualization with a consistent grammar throughout. Momocs allows reproducible, complex morphometric analyses, paves the way for a pure open-source workflow in R, 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

616

Version

1.1.6

License

GPL-2 | GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Vincent Bonhomme

Last Published

April 17th, 2017

Functions in Momocs (1.1.6)

Coo

Coo "super" class
KMEANS

KMEANS on PCA objects
boxplot.PCA

Boxplot on PCA objects
breed

Jitters Coe (and others) objects
coeff_split

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

Some color palettes
coo_dxy

Calculate abscissa and ordinate on a shape
coo_eccentricityboundingbox

Calculates the eccentricity (bounding box) of a shape
coo_ruban

Plots differences as (colored) segments aka a ruban
coo_up

Retains coordinates with positive y-coordinates
coo_width

Calculates the width of a shape
wings

Data: Landmarks coordinates of mosquito wings
coo_rotatecenter

Rotates shapes with a custom center
def_ldk

Defines new landmarks on Out and Opn objects
dfourier_shape

Calculates and draws 'dfourier' shapes
dissolve

Dissolves Coe objects
export

Exports Coe objects and shapes
fProcrustes

Full Procrustes alignment between two shapes
hist.OutCoe

Histogram of morphometric coefficients
img_plot

Plots a .jpg image
is_closed

Tests if shapes are closed
is_equallyspacedradii

Tests if coordinates likely have equally spaced radii
m2d

Converts a matrix of coordinates to a data.frame
m2l

Converts a matrix of coordinates to a list of coordinates.
plot2

Plots Principal Component Analysis ala ggplot2
plot3

#' @describeIn plot.PCA
reexports

Objects exported from other packages
rename

Renames (ala dplyr) on Momocs objects
rm_asym

Removes asymmetric and symmetric variation on OutCoe objects
rm_harm

Removes harmonics from Coe objects
symmetry

Calcuates symmetry indices on OutCoe objects
table

Cross-tabulates objects
transmute

Transmutes (ala dplyr) on Momocs objects
truss

Truss measurement
Momocs_lastversion

Install and load the last version of Momocs
Momocs_version

Get Momocs version
a2m

Converts an array of coordinates to a matrix
add_ldk

Adds new landmarks on Out and Opn objects
conf_ell

Confidence ellipses
coo_align

Aligns coordinates
coo_arrows

Plots (lollipop) differences between two configurations
coo_baseline

Register new baselines
coo_close

Closes/uncloses shapes
coo_convexity

Calculates the convexity of a shape
coo_eccentricityeigen

Calculates the eccentricity (using eigenvalues) of a shape
coo_elongation

Calculates the elongation of a shape
coo_lw

Calculates length and width of a shape
coo_nb

Counts coordinates
coo_perimcum

Calculates the cumulative chordal distance along a shape.
coo_perimpts

Calculates the chordal distance along a shape.
coo_slide

Slides coordinates
coo_slidedirection

Slides coordinates in a particular direction
coo_tangle

Calculates the tangent angle along the perimeter of a shape
coo_template

'Templates' shapes
shapes

Data: Outline coordinates of various shapes
trilo

Data: Outline coordinates of cephalic outlines of trilobite
ed

Calculates euclidean distance between two points.
edi

Calculates euclidean intermediate between two points.
filter

Filters (ala dplyr) on Momocs objects
flip_PCaxes

Flips PCA axes
get_pairs

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

Extracts sliding landmarks coordinates
ldk_labels

Add landmarks labels
ldk_links

Draws links between landmarks
CLUST

Hierarchical clustering
Coe

Coe "super" class
Ntable

Plots confusion matrix of sample sizes within $fac
Opn

Builds an Opn object
as_df

Converts Momocs objects to data.frames
at_least

Retains group with at least a certain number of individuals
calibrate_deviations

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

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

Rearrange a matrix of (typically Fourier) coefficients
coeff_sel

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

Aligns shapes along the x-axis
coo_area

Calculates the area of a shape
pProcrustes

Partial Procrustes alignment between two shapes
panel

Family picture of shapes
plot_CV

Plots a cross-validation table as an heatmap
coo_circularityharalick

Calculates the Haralick's circularity of a shape
coo_circularitynorm

Calculates the 'normalized' circularity of a shape
coo_jitter

Jitters shapes
coo_ldk

Defines landmarks interactively
plot_CV2

Plots a cross-correlation table
rescale

Rescale coordinates from pixels to real length units
rfourier

Radii variation Fourier transform (equally spaced radii)
scree

Methods for PCA eigen values
coo_slidegap

Slides coordinates using the widest gap
coo_smooth

Smoothes coordinates
coo_trimbottom

Trims bottom coordinates from shape
select

Selects (ala dplyr) on Momocs objects
stack2

Family picture of shapes (ggplot2)
subset.Coo

Subsets on Momocs objects
tps_arr

Deformation 'vector field' using Thin Plate Splines
tps_grid

Deformation grids using Thin Plate Splines
coo_trimtop

Trims top coordinates from shape
hearts

Data: Outline coordinates of hand-drawn hearts
molars

Data: Outline coordinates of 360 molars
oak

Data: Configuration of landmarks of oak leaves
olea

Data: Outline coordinates of olive seeds open outlines.
efourier

Elliptical Fourier transform
efourier_i

Inverse elliptical Fourier transform
efourier_norm

Normalizes harmonic coefficients.
efourier_shape

Calculates and draw 'efourier' shapes.
ldk_check

Checks 'ldk' shapes
ldk_chull

Draws convex hulls around landmark positions
ldk_confell

Draws confidence ellipses for landmark positions
ldk_contour

Draws kernel density contours around landmark
LDA

Linear Discriminant Analysis on Coe objects
Ldk

Builds an Ldk object
PCcontrib

Shape variation along PC axes
Ptolemy

Ptolemaic ellipses and illustration of efourier
arrange

Arranges (ala dplyr) on Momocs objects
as.Out

Convert an OutCoe object into an Out object
ntsrow2Coo

Imports .nts to Coo objects
opoly

Calculate orthogonal polynomial fits on open outlines
plot_devsegments

Draws colored segments from a matrix of coordinates.
plot_mshapes

Pairwise comparison of a list of shapes
sample_frac

Samples a fraction of shapes in Momocs objects
sample_n

Samples n shapes on Momocs objects
tps_iso

Deformation isolines using Thin Plate Splines.
calibrate_r2

Quantitative r2 calibration for Opn objects
calibrate_reconstructions

Calibrate using reconstructed shapes
col_transp

Transparency helpers and palettes
tps_raw

Vanilla Thin Plate Splines
combine

Combines Momocs objects
coo_aligncalliper

Aligns shapes along their 'calliper length'
coo_alignminradius

Aligns shapes using their shortest radius
coo_center

Centers coordinates
coo_centpos

Calculate centroid coordinates
coo_down

coo_down -----------------
coo_draw

Adds a shape to the current plot
coo_left

Retains coordinates with negative x-coordinates
coo_length

Calculates the length of a shape
coo_rectilinearity

Calculates the rectilinearity of a shape
coo_rev

Reverses coordinates
coo_shearx

Shears shapes
coo_slice

Slices shapes between successive coordinates
coo_smoothcurve

Smoothes coordinates on curves
coo_solidity

Calculates the solidity of a shape
bot

Data: Outline coordinates of beer and whisky bottles.
chaff

Data: Landmark and semilandmark coordinates on cereal glumes
mosquito

Data: Outline coordinates of mosquito wings.
mouse

Data: Outline coordinates of mouse molars
dfourier

Discrete cosinus transform
dfourier_i

Investe discrete cosinus transform
get_chull_area

Calculates convex hull area/volume of PCA scores
get_ldk

Retrieves landmarks coordinates
import_Conte

Extracts outlines coordinates from an image silhouette
import_StereoMorph_curve1

Imports files creates by StereoMorph into Momocs
import_tps

Imports a tps file
import_txt

Imports coordinates from a .txt file
lf_structure

Extracts structure from filenames
links_all

Creates links (all pariwise combinations) between landmarks
m2ll

Converts a matrix of coordinates into a list of matrices
measure

Measures shape descriptors
panel2

Family picture of shapes (ggplot2)
perm

Permutes and breed Coe (and others) objects
opoly_i

Calculates shape from a polynomial model
pos.shapes

Calculates nice positions on a plane for drawing shapes
sfourier_shape

Calculates and draw 'sfourier' shapes.
slice

Slices (ala dplyr) on Momocs objects
tfourier_shape

Calculates and draws 'tfourier' shapes.
tie_jpg_txt

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

Identify outliers
Momocs

Momocs
Momocs_help

Browse Momocs online doc
OpnCoe

Builds an OpnCoe object
Out

Builds an Out object
TraCoe

Traditional morphometrics class
a2l

Converts an array of coordinates to a list of matrices
bind_db

Binds with a database
boxplot.OutCoe

Boxplot of morphometric coefficients
chop

Chops (rough slicing) Momocs objects
classify

Classify using LDA
coo_bookstein

Register Bookstein's coordinates
coo_boundingbox

Calculates coordinates of the bounding box
coo_chull

Calculates the convex hull of a shape
coo_circularity

Calculates the circularity of a shape
coo_extract

Extract coordinates from a shape
coo_flipx

Flips shapes
coo_listpanel

Plots sets of shapes.
coo_lolli

Plots (lollipop) differences between two configurations
coo_plot

Plots a single shape
coo_rectangularity

Calculates the rectangularity of a shape
coo_scale

Scales coordinates
coo_scalex

Shrinks coordinates in one direction
coo_trans

Translates coordinates
coo_trim

Trims both ends coordinates from shape
d

A wrapper to calculates euclidean distances between two points
apodemus

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

Defines links between landmarks
def_slidings

Defines sliding landmarks matrix
import_jpg

Extracts outline coordinates from multiple .jpg files
import_jpg1

Extracts outline coordinates from a single .jpg file
l2a

Converts a list of coordinates to an array of coordinates
l2m

Converts a list of coordinates to a matrix of coordinates.
links_delaunay

Creates links (Delaunay triangulation) between landmarks
m2a

Converts a matrix of coordinates to an array of coordinates
nef2Coe

Imports .nef to Coe objects
npoly

Calculate natural polynomial fits on open outlines
pix2chc

Converts (x; y) coordinates to chaincoded coordinates
plot.Coo

Graphical inspection of shapes
reLDA

"Redo" a LDA on new data
rePCA

"Redo" a PCA on a new Coe
rm_uncomplete

Removes shapes with incomplete slices
rw_fac

Renames levels on Momocs objects
sfourier

Radii variation Fourier transform (equally spaced curvilinear abscissa)
sfourier_i

Inverse radii variation Fourier transform
tps2coo

Reads a single tps-like shape as lines
tps2d

Thin Plate Splines for 2D data
MANOVA

Multivariate analysis of (co)variance on Coe objects
MANOVA_PW

Pairwise Multivariate analyses of variance
OutCoe

Builds an OutCoe object
PCA

Principal component analysis on Coe objects
bezier

Calculates Bezier coefficients from a shape
bezier_i

Calculates a shape from Bezier coefficients
chc2Out

Converts chain-coded coordinates to Out object
chc2pix

Converts chain-coded coordinates to (x; y) coordinates
coo_calliper

Calculates the calliper length
coo_centdist

Returns the distance between everypoints and the centroid
coo_centsize

Calculates centroid size
coo_check

Checks shapes
coo_force2close

Forces shapes to close
coo_interpolate

Interpolates coordinates
coo_oscillo

Momocs' 'oscilloscope' for Fourier-based approaches
coo_perim

Calculates the perimeter
coo_right

Retains coordinates with positive x-coordinates
coo_rotate

Rotates coordinates
coo_sample

Sample coordinates (among points)
coo_samplerr

Samples coordinates (regular radius)
coo_theta3

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

Calculates the angle of every edge of a shape
charring

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

Data: Measurement of iris flowers
edm

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

Calculates the shortest euclidean distance found for every point of one
fgProcrustes

Full Generalized Procrustes alignment between shapes
fgsProcrustes

Full Generalized Procrustes alignment between shapes with sliding landmarks
hcontrib

Harmonic contribution to shape
harm_pow

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

Various class/component testers
is_clockwise

Tests if shapes are developping clockwise or anticlockwise
mshapes

Mean shape calculation for Coo, Coe, etc.
mutate

Mutates (ala dplyr) on Momocs objects
plot.LDA

Plots Linear Discriminant Analysis
plot.PCA

Plots Principal Component Analysis
rfourier_i

Inverse radii variation Fourier transform
rfourier_shape

Calculates and draw 'rfourier' shapes.
slidings_scheme

Extracts partitions of sliding coordinates
stack.Coo

Family picture of shapes
tfourier

Tangent angle Fourier transform
tfourier_i

Inverse tangent angle Fourier transform
validate

Validates Coo objects
vecs_param

Some vector utilities.