Learn R Programming

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

Momocs (version 1.0.0)

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.0.0

License

GPL-2 | GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Vincent Bonhomme

Last Published

March 18th, 2016

Functions in Momocs (1.0.0)

Coo

Coo "super" class
Opn

Builds an Opn object
as.Out

Convert an OutCoe object into an Out object
Ntable

Plots confusion matrix of sample sizes within $fac
Coe

Coe "super" class
MANOVA_PW

Pairwise Multivariate analyses of variance
PCA

Principal component analysis on Coe objects
coo_down

coo_down ----------------- Retains coordinates with negative y-coordinates
LDA

Linear Discriminant Analysis on Coe objects
combine

Combines Momocs objects
coo_listpanel

Plots sets of shapes.
Momocs_lastversion

Install and load the last version of Momocs
coo_samplerr

Samples coordinates (regular radius)
breed

Jitters Coe (and others) objects
coo_ldk

Defines landmarks interactively
coo_circularityharalick

Calculates the Haralick's circularity of a shape
coo_center

Centers coordinates
Ldk

Builds an Ldk object
coo_jitter

Jitters shapes
coo_right

Retains coordinates with positive x-coordinates
coo_rev

Reverses coordinates
coo_convexity

Calculates the convexity of a shape
coo_interpolate

Interpolates coordinates
at_least

Retains group with at least a certain number of individuals
classify

Classify using LDA
MANOVA

Multivariate analysis of variance on Coe objects
coo_draw

Adds a shape to the current plot
coo_flipx

Flips shapes
CLUST

Hierarchical clustering
calibrate_deviations

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

Calculates the convex hull of a shape
coo_ruban

Plots differences as (colored) segments aka a ruban
boxplot.PCA

Boxplot on PCA objects
conf_ell

Confidence ellipses
coo_centsize

Calculates centroid size
coo_oscillo

Momocs' 'oscilloscope' for Fourier-based approaches
as_df

Converts Momocs objects to data.frames
coo_nb

Counts coordinates
harm_pow

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

A wrapper to calculates euclidean distances between two points
Out

Builds an Out object
coo_baseline

Register new baselines
coo_perimcum

Calculates the cumulative chordal distance along a shape.
chaff

Data: Landmark and semilandmark coordinates on cereal glumes
bind_db

Binds with a database
coo_align

Aligns coordinates
opoly_i

Calculates shape from a polynomial model
m2a

Converts a matrix of coordinates to an array of coordinates
coo_smoothcurve

Smoothes coordinates on curves
coo_close

Closes/uncloses shapes
KMEANS

KMEANS on PCA objects
coo_sample

Sample coordinates (among points)
coo_calliper

Calculates the calliper length
a2m

Converts an array of coordinates to a matrix
coo_scale

Scales coordinates
coo_check

Checks shapes
coo_thetapts

Calculates the angle of every edge of a shape
dfourier

Discrete cosinus transform
Momocs_help

Browse Momocs online doc
coo_elongation

Calculates the elongation of a shape
coo_perimpts

Calculates the chordal distance along a shape.
bezier

Calculates Bezier coefficients from a shape
mosquito

Data: Outline coordinates of mosquito wings.
calibrate_reconstructions

Calibrate using reconstructed shapes
arrange

Arranges (ala dplyr) on Momocs objects
coo_eccentricityboundingbox

Calculates the eccentricity (bounding box) of a shape
bot

Data: Outline coordinates of beer and whisky bottles.
coo_dxy

Calculate abscissa and ordinate on a shape
olea

Data: Outline coordinates of olive seeds open outlines.
OutCoe

Builds an OutCoe object
coo_area

Calculates the area of a shape
coo_slide

Slides coordinates
dfourier_i

Investe discrete cosinus transform
coo_shearx

Shears shapes
def_ldk

Defines landmarks on Out and Opn objects
edi

Calculates euclidean intermediate between two points.
calibrate_r2

Quantitative r2 calibration for Opn objects
coo_perim

Calculates the perimeter
Ptolemy

Ptolemaic ellipses and illustration of efourier
coeff_sel

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

Calculates and draw 'rfourier' shapes.
coeff_split

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

Transparency helpers and palettes
Momocs_version

Get Momocs version
OpnCoe

Builds an OpnCoe object
bezier_i

Calculates a shape from Bezier coefficients
coo_tangle

Calculates the tangent angle along the perimeter of a shape
coo_rectangularity

Calculates the rectangularity of a shape
chop

Chops (rough slicing) Momocs objects
coo_length

Calculates the length of a shape
PCcontrib

Shape variation along PC axes
coo_scalex

Shrinks coordinates in one direction
nef2Coe

Imports .nef to Coe objects
dissolve

Dissolves Coe objects
coo_solidity

Calculates the solidity of a shape
Momocs

Momocs
coo_circularitynorm

Calculates the 'normalized' circularity of a shape
coo_eccentricityeigen

Calculates the eccentricity (using eigenvalues) of a shape
coo_smooth

Smoothes coordinates
coo_extract

Extract coordinates from a shape
efourier

Elliptical Fourier transform
TraCoe

Traditional morphometrics class
panel

Family picture of shapes
coo_slidegap

Slides coordinates using the widest gap
chc2pix

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

Calculates convex hull area/volume of PCA scores
coo_left

Retains coordinates with negative x-coordinates
export

Exports Coe objects and shapes
lf_structure

Extracts structure from filenames
is_closed

Tests if shapes are closed
hcontrib

Harmonic contribution to shape
coo_up

Retains coordinates with positive y-coordinates
coo_trim

Trims coordinates from shape
rw_rule

Renames levels on Momocs objects
coo_trans

Translates coordinates
oak

Data: Configuration of landmarks of oak leaves
get_ldk

Retrieves landmarks coordinates
ldk_labels

Add landmarks labels
import_StereoMorph_curve1

Imports files creates by StereoMorph into Momocs
import_Conte

Extracts outlines coordinates from an image silhouette
subset.Coo

Subsets on Momocs objects
is

Various class/component testers
get_slidings

Extracts sliding landmarks coordinates
hist.OutCoe

Histogram of morphometric coefficients
efourier_norm

Normalizes harmonic coefficients.
rm_asym

Removes asymmetric and symmetric variation on OutCoe objects
coo_rotate

Rotates coordinates
pos.shapes

Calculates nice positions on a plane for drawing shapes
efourier_i

Inverse elliptical Fourier transform
mutate

Mutates (ala dplyr) on Momocs objects
rfourier_i

Inverse radii variation Fourier transform
coo_plot

Plots a single shape
plot.PCA

Plots Principal Component Analysis
shapes

Data: Outline coordinates of various shapes
import_txt

Imports coordinates from a .txt file
def_links

Defines links between landmarks
plot.Coo

Graphical inspection of shapes
img_plot

Plots a .jpg image
edm

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

Plots (lollipop) differences between two configurations
import_jpg

Extracts outline coordinates from multiple .jpg files
filter

Filters (ala dplyr) on Momocs objects
perm

Permutes and breed Coe (and others) objects
efourier_shape

Calculates and draw 'efourier' shapes.
tfourier_shape

Calculates and draws 'tfourier' shapes.
coo_width

Calculates the width of a shape
truss

Truss measurement
tps_grid

Deformation grids using Thin Plate Splines
sample_frac

Samples a fraction of shapes in Momocs objects
coo_rotatecenter

Rotates shapes with a custom center
reLDA

"Redo" a LDA on new data
ldk_contour

Draws kernel density contours around landmark
m2l

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

Slices shapes between successive coordinates
flower

Data: Measurement of iris flowers
panel2

Family picture of shapes (ggplot2)
scree

Methods for PCA eigen values
boxplot.OutCoe

Boxplot of morphometric coefficients
pProcrustes

Partial Procrustes alignment between two shapes
ldk_check

Checks 'ldk' shapes
fProcrustes

Full Procrustes alignment between two shapes
ldk_chull

Draws convex hulls around landmark positions
col_summer

Some color palettes
plot2

Plots Principal Component Analysis ala ggplot2
coo_centpos

Calculate centroid coordinates
rename

Renames (ala dplyr) on Momocs objects
trilo

Data: Outline coordinates of cephalic outlines of trilobite
rm_uncomplete

Removes shapes with incomplete slices
hearts

Data: Outline coordinates of hand-drawn hearts
links_all

Creates links (all pariwise combinations) between landmarks
molars

Data: Outline coordinates of 360 molars
fgsProcrustes

Full Generalized Procrustes alignment between shapes with sliding landmarks
stack2

Family picture of shapes (ggplot2)
plot_CV2

Plots a cross-correlation table
tps_arr

Deformation 'vector field' using Thin Plate Splines
wings

Data: Landmarks coordinates of mosquito wings
fgProcrustes

Full Generalized Procrustes alignment between shapes
opoly

Calculate orthogonal polynomial fits on open outlines
plot_devsegments

Draws colored segments from a matrix of coordinates.
tps2coo

Reads a single tps-like shape as lines
measure

Measures shape descriptors
coo_bookstein

Register Bookstein's coordinates
rePCA

"Redo" a PCA on a new Coe
import_jpg1

Extracts outline coordinates from a single .jpg file
m2d

Converts a matrix of coordinates to a data.frame
rescale

Rescale coordinates from pixels to real length units
l2a

Converts a list of coordinates to an array of coordinates
tfourier

Tangent angle Fourier transform
tie_jpg_txt

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

Draws confidence ellipses for landmark positions
m2ll

Converts a matrix of coordinates into a list of matrices
rm_harm

Removes harmonics from Coe objects
tps_iso

Deformation isolines using Thin Plate Splines.
slidings_scheme

Extracts partitions of sliding coordinates
tps_raw

Vanilla Thin Plate Splines
slice

Slices (ala dplyr) on Momocs objects
ntsrow2Coo

Imports .nts to Coo objects
l2m

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

Cross-tabulates objects
a2l

Converts an array of coordinates to a list of matrices
coo_rectilinearity

Calculates the rectilinearity of a shape
which_out

Remove outliers on Coe
coo_force2close

Forces shapes to close
tps2d

Thin Plate Splines for 2D data
stack.Coo

Family picture of shapes
rfourier

Radii variation Fourier transform
coo_aligncalliper

Aligns shapes along their 'calliper length'
edm_nearest

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

Aligns shapes using their shortest radius
symmetry

Calcuates symmetry indices on OutCoe objects
coo_theta3

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

'Templates' shapes
dfourier_shape

Calculates and draws 'dfourier' shapes
def_slidings

Defines sliding landmarks matrix
plot.LDA

Plots Linear Discriminant Analysis
plot3

#' @describeIn plot.PCA #' @export mplot <- plot.PCA Plots a combination of the three first PCs
reexports

Objects exported from other packages
sample_n

Samples n shapes on Momocs objects
tfourier_i

Inverse tangent angle Fourier transform
charring

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

Calculates length and width of a shape
validate

Validates Coo objects
chc2Out

Converts chain-coded coordinates to Out object
coo_arrows

Plots (lollipop) differences between two configurations
npoly

Calculate natural polynomial fits on open outlines
coo_circularity

Calculates the circularity of a shape
coo_slidedirection

Slides coordinates in a particular direction
ed

Calculates euclidean distance between two points.
get_pairs

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

Imports a tps file
links_delaunay

Creates links (Delaunay triangulation) between landmarks
ldk_links

Draws links between landmarks
plot_CV

Plots a cross-validation table as an heatmap
transmute

Transmutes (ala dplyr) on Momocs objects
calibrate_harmonicpower

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

Aligns shapes along the x-axis
mshapes

Mean shape calculation for Coo, Coe, etc.
coo_centdist

Returns the distance between everypoints and the centroid
pix2chc

Converts (x; y) coordinates to chaincoded coordinates
select

Selects (ala dplyr) on Momocs objects
vecs_param

Some vector utilities.