----- Forwarded message from Ricardo Kriebel
<[email protected]> -----
Date: Wed, 16 Jan 2013 09:34:50
-0500
From: Ricardo Kriebel <[email protected]>
Reply-To: Ricardo
Kriebel <[email protected]>
Subject: Re: Morphometrics questions
To: [email protected]
Hi Eloise,
For shapes such as triangles in which it is perhaps
difficult to place homologues landmarks besides perhaps at the top and the two
bottom sides I would try outline analysis such as Elliptic Fourier Analysis.
There is a new package for R called Momocs which does EFA and has amazing
graphics and many capabilities such as MANOVA. See some examples here: http://vincentbonhomme.fr/momocs/
All you need to do is
binarize your teeth making the tooth black and the background white and put them
in a folder and then you can read them into R with the read.jpg function. Below
some code to get started (I would get RStudio to make the R experience
better):
setwd("your_working_directory")
library(Momocs)
jpg.list<-list.files(pattern
=
".jpg")
import.jpg(jpg.list)->stingray_teeth
Coo(stingray_teeth)->coo_stingray_teeth
read.csv("your_grouping_variable.csv")->c
### import grouping variable
c<-data.frame(c[,1:2])
panel(coo_stingray_teeth, col=1,
border=FALSE) ### visualize the teeth you
just read in
coo_stingray_teeth@fac <-
c
### add your groups to the Coo object
eFourier(coo_stingray_teeth)->efou_stingray_teeth
### conduct EFA
pca_efou_stingray_teeth <-
pca(efou_stingray_teeth) ### conduct PCA of the EFA
coefficients
dudi.plot(pca_efou_stingray_teeth, "your_groups",
palette=col.blackgallus, ###plot the PCA results
nr.shp=5, nc.shp=4, scale.shp=0.5, rotate.shp=4.65,
labels=FALSE, eigen=FALSE, points=TRUE, star=TRUE, title=NULL, lwd=5)
----- End forwarded message -----
