knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "README-" )
<bonhomme.vincent@gmail.com>
rgeos
dependencyThe last released version can be installed from CRAN with:
install.packages("Momocs")
But I recommend using (and only support) the development version from GitHub with:
# install.packages("devtools") devtools::install_github("MomX/Momocs")
This is a basic example of a complete analysis doing: inspection, normalization of raw outlines, elliptical Fourier transforms, dimmensionality reduction and classification, using a single line.
library(Momocs)
devtools::load_all()
options(Momocs_verbose = FALSE)
hearts %T>% # A toy dataset stack() %>% # Take a family picture of raw outlines fgProcrustes() %>% # Full generalized Procrustes alignment coo_slide(ldk = 2) %T>% # Redefine a robust 1st point between the cheeks stack() %>% # Another picture of aligned outlines efourier(6, norm=FALSE) %>% # Elliptical Fourier Transforms PCA() %T>% # Principal Component Analysis plot_PCA(~aut) %>% # A PC1:2 plot LDA(~aut) %>% # Linear Discriminant Analysis plot_CV() # And the confusion matrix after leave one out cross validation
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.