Learn R Programming

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

Momocs (version 1.1.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

669

Version

1.1.0

License

GPL-2 | GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Vincent Bonhomme

Last Published

October 25th, 2016

Functions in Momocs (1.1.0)

as.Out

Convert an OutCoe object into an Out object
bind_db

Binds with a database
arrange

Arranges (ala dplyr) on Momocs objects
add_ldk

Adds new landmarks on Out and Opn objects
bezier_i

Calculates a shape from Bezier coefficients
at_least

Retains group with at least a certain number of individuals
as_df

Converts Momocs objects to data.frames
a2m

Converts an array of coordinates to a matrix
a2l

Converts an array of coordinates to a list of matrices
bezier

Calculates Bezier coefficients from a shape
chc2pix

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

Quantitative r2 calibration for Opn objects
calibrate_reconstructions

Calibrate using reconstructed shapes
boxplot.PCA

Boxplot on PCA objects
calibrate_harmonicpower

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

Converts chain-coded coordinates to Out object
calibrate_deviations

Quantitative calibration, through deviations, for Out and Opn objects
boxplot.OutCoe

Boxplot of morphometric coefficients
chop

Chops (rough slicing) Momocs objects
breed

Jitters Coe (and others) objects
coeff_sel

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

Some color palettes
coo_align

Aligns coordinates
CLUST

Hierarchical clustering
Coe

Coe "super" class
col_transp

Transparency helpers and palettes
conf_ell

Confidence ellipses
coeff_split

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

Combines Momocs objects
classify

Classify using LDA
coo_center

Centers coordinates
coo_alignxax

Aligns shapes along the x-axis
coo_area

Calculates the area of a shape
coo_aligncalliper

Aligns shapes along their 'calliper length'
coo_arrows

Plots (lollipop) differences between two configurations
coo_centdist

Returns the distance between everypoints and the centroid
coo_calliper

Calculates the calliper length
coo_baseline

Register new baselines
coo_bookstein

Register Bookstein's coordinates
coo_alignminradius

Aligns shapes using their shortest radius
coo_centsize

Calculates centroid size
coo_circularity

Calculates the circularity of a shape
coo_check

Checks shapes
coo_centpos

Calculate centroid coordinates
coo_down

coo_down ----------------- Retains coordinates with negative y-coordinates
coo_convexity

Calculates the convexity of a shape
coo_chull

Calculates the convex hull of a shape
coo_circularityharalick

Calculates the Haralick's circularity of a shape
coo_circularitynorm

Calculates the 'normalized' circularity of a shape
coo_close

Closes/uncloses shapes
coo_flipx

Flips shapes
coo_draw

Adds a shape to the current plot
coo_force2close

Forces shapes to close
coo_perimcum

Calculates the cumulative chordal distance along a shape.
coo_dxy

Calculate abscissa and ordinate on a shape
coo_perimpts

Calculates the chordal distance along a shape.
coo_plot

Plots a single shape
coo_perim

Calculates the perimeter
coo_smooth

Smoothes coordinates
coo_smoothcurve

Smoothes coordinates on curves
coo_listpanel

Plots sets of shapes.
coo_length

Calculates the length of a shape
coo_interpolate

Interpolates coordinates
coo_ruban

Plots differences as (colored) segments aka a ruban
coo_jitter

Jitters shapes
coo_eccentricityboundingbox

Calculates the eccentricity (bounding box) of a shape
coo_scale

Scales coordinates
coo_sample

Sample coordinates (among points)
coo_samplerr

Samples coordinates (regular radius)
coo_eccentricityeigen

Calculates the eccentricity (using eigenvalues) of a shape
coo_ldk

Defines landmarks interactively
coo_left

Retains coordinates with negative x-coordinates
coo_slice

Slices shapes between successive coordinates
coo_slide

Slides coordinates
coo_thetapts

Calculates the angle of every edge of a shape
coo_width

Calculates the width of a shape
coo_tangle

Calculates the tangent angle along the perimeter of a shape
coo_solidity

Calculates the solidity of a shape
coo_trans

Translates coordinates
wings

Data: Landmarks coordinates of mosquito wings
Coo

Coo "super" class
efourier_shape

Calculates and draw 'efourier' shapes.
import_jpg1

Extracts outline coordinates from a single .jpg file
filter

Filters (ala dplyr) on Momocs objects
import_jpg

Extracts outline coordinates from multiple .jpg files
fgsProcrustes

Full Generalized Procrustes alignment between shapes with sliding landmarks
efourier

Elliptical Fourier transform
coo_theta3

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

'Templates' shapes
flower

Data: Measurement of iris flowers
hearts

Data: Outline coordinates of hand-drawn hearts
dfourier_i

Investe discrete cosinus transform
efourier_i

Inverse elliptical Fourier transform
dfourier_shape

Calculates and draws 'dfourier' shapes
fProcrustes

Full Procrustes alignment between two shapes
efourier_norm

Normalizes harmonic coefficients.
get_chull_area

Calculates convex hull area/volume of PCA scores
LDA

Linear Discriminant Analysis on Coe objects
ldk_check

Checks 'ldk' shapes
links_delaunay

Creates links (Delaunay triangulation) between landmarks
Momocs_version

Get Momocs version
m2a

Converts a matrix of coordinates to an array of coordinates
Momocs

Momocs
Opn

Builds an Opn object
OpnCoe

Builds an OpnCoe object
plot.LDA

Plots Linear Discriminant Analysis
plot.Coo

Graphical inspection of shapes
coo_nb

Counts coordinates
coo_oscillo

Momocs' 'oscilloscope' for Fourier-based approaches
coo_rev

Reverses coordinates
coo_right

Retains coordinates with positive x-coordinates
d

A wrapper to calculates euclidean distances between two points
olea

Data: Outline coordinates of olive seeds open outlines.
bot

Data: Outline coordinates of beer and whisky bottles.
oak

Data: Configuration of landmarks of oak leaves
hcontrib

Harmonic contribution to shape
hist.OutCoe

Histogram of morphometric coefficients
is

Various class/component testers
KMEANS

KMEANS on PCA objects
m2ll

Converts a matrix of coordinates into a list of matrices
MANOVA_PW

Pairwise Multivariate analyses of variance
plot.PCA

Plots Principal Component Analysis
plot2

Plots Principal Component Analysis ala ggplot2
mshapes

Mean shape calculation for Coo, Coe, etc.
mutate

Mutates (ala dplyr) on Momocs objects
scree

Methods for PCA eigen values
sample_n

Samples n shapes on Momocs objects
select

Selects (ala dplyr) on Momocs objects
slice

Slices (ala dplyr) on Momocs objects
tps_iso

Deformation isolines using Thin Plate Splines.
tps_raw

Vanilla Thin Plate Splines
ldk_contour

Draws kernel density contours around landmark
ldk_labels

Add landmarks labels
validate

Validates Coo objects
truss

Truss measurement
ldk_links

Draws links between landmarks
Ldk

Builds an Ldk object
Momocs_lastversion

Install and load the last version of Momocs
Momocs_help

Browse Momocs online doc
panel2

Family picture of shapes (ggplot2)
PCA

Principal component analysis on Coe objects
rePCA

"Redo" a PCA on a new Coe
plot_CV2

Plots a cross-correlation table
plot_devsegments

Draws colored segments from a matrix of coordinates.
rescale

Rescale coordinates from pixels to real length units
rm_uncomplete

Removes shapes with incomplete slices
rm_harm

Removes harmonics from Coe objects
stack.Coo

Family picture of shapes
slidings_scheme

Extracts partitions of sliding coordinates
TraCoe

Traditional morphometrics class
coo_rotate

Rotates coordinates
coo_rotatecenter

Rotates shapes with a custom center
coo_scalex

Shrinks coordinates in one direction
coo_shearx

Shears shapes
molars

Data: Outline coordinates of 360 molars
coo_up

Retains coordinates with positive y-coordinates
coo_trimtop

Trims top coordinates from shape
def_ldk

Defines new landmarks on Out and Opn objects
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.
get_slidings

Extracts sliding landmarks coordinates
import_txt

Imports coordinates from a .txt file
harm_pow

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

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

Converts a list of coordinates to an array of coordinates
is_closed

Tests if shapes are closed
m2d

Converts a matrix of coordinates to a data.frame
Ntable

Plots confusion matrix of sample sizes within $fac
m2l

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

Imports .nts to Coo objects
transmute

Transmutes (ala dplyr) on Momocs objects
mosquito

Data: Outline coordinates of mosquito wings.
shapes

Data: Outline coordinates of various shapes
ed

Calculates euclidean distance between two points.
trilo

Data: Outline coordinates of cephalic outlines of trilobite
edi

Calculates euclidean intermediate between two points.
export

Exports Coe objects and shapes
import_StereoMorph_curve1

Imports files creates by StereoMorph into Momocs
fgProcrustes

Full Generalized Procrustes alignment between shapes
import_tps

Imports a tps file
coo_elongation

Calculates the elongation of a shape
coo_extract

Extract coordinates from a shape
coo_lolli

Plots (lollipop) differences between two configurations
coo_rectangularity

Calculates the rectangularity of a shape
coo_lw

Calculates length and width of a shape
coo_slidedirection

Slides coordinates in a particular direction
coo_rectilinearity

Calculates the rectilinearity of a shape
coo_slidegap

Slides coordinates using the widest gap
coo_trim

Trims both ends coordinates from shape
ldk_chull

Draws convex hulls around landmark positions
ldk_confell

Draws confidence ellipses for landmark positions
measure

Measures shape descriptors
panel

Family picture of shapes
OutCoe

Builds an OutCoe object
MANOVA

Multivariate analysis of (co)variance on Coe objects
perm

Permutes and breed Coe (and others) objects
PCcontrib

Shape variation along PC axes
coo_trimbottom

Trims bottom coordinates from shape
charring

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

Data: Landmark and semilandmark coordinates on cereal glumes
dfourier

Discrete cosinus transform
def_slidings

Defines sliding landmarks matrix
def_links

Defines links between landmarks
get_pairs

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

Retrieves landmarks coordinates
dissolve

Dissolves Coe objects
img_plot

Plots a .jpg image
Ptolemy

Ptolemaic ellipses and illustration of efourier
reexports

Objects exported from other packages
rfourier

Radii variation Fourier transform
table

Cross-tabulates objects
symmetry

Calcuates symmetry indices on OutCoe objects
rm_asym

Removes asymmetric and symmetric variation on OutCoe objects
lf_structure

Extracts structure from filenames
import_Conte

Extracts outlines coordinates from an image silhouette
tps_grid

Deformation grids using Thin Plate Splines
tps_arr

Deformation 'vector field' using Thin Plate Splines
links_all

Creates links (all pariwise combinations) between landmarks
nef2Coe

Imports .nef to Coe objects
npoly

Calculate natural polynomial fits on open outlines
opoly

Calculate orthogonal polynomial fits on open outlines
rw_rule

Renames levels on Momocs objects
plot3

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

Calculates shape from a polynomial model
plot_CV

Plots a cross-validation table as an heatmap
pix2chc

Converts (x; y) coordinates to chaincoded coordinates
sample_frac

Samples a fraction of shapes in Momocs objects
vecs_param

Some vector utilities.
tfourier_shape

Calculates and draws 'tfourier' shapes.
tfourier_i

Inverse tangent angle Fourier transform
pos.shapes

Calculates nice positions on a plane for drawing shapes
pProcrustes

Partial Procrustes alignment between two shapes
tfourier

Tangent angle Fourier transform
rfourier_shape

Calculates and draw 'rfourier' shapes.
tie_jpg_txt

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

"Redo" a LDA on new data
Out

Builds an Out object
which_out

Remove outliers on Coe
rfourier_i

Inverse radii variation Fourier transform
rename

Renames (ala dplyr) on Momocs objects
stack2

Family picture of shapes (ggplot2)
subset.Coo

Subsets on Momocs objects
tps2d

Thin Plate Splines for 2D data
tps2coo

Reads a single tps-like shape as lines