Sunday, January 13, 2013

'read.morphologika' update

Update for read.morphologika function. This code will be added to geomorph on our next package update. This update fixes problems with message "object 'incoords' not found". Can be used with example data set mydata_readmorphologika. Here, I provide sample data in the Morphologika format composed of two specimens with 50 landmarks each, and with four data attributes. To import data attributes use matrix = TRUE, and make sure Morphologika attribute tags: '[labels]' and '[labelvalues]' are present, else use matrix = FALSE.The latter imports an array of landmarks only. Please see the geomorph manual for use of read.morphologika.

For example:

> setwd("C:/Programming")
> file<-"C:/Programming/mydata_readmorphologika.txt"
> mydata<-read.morphologika(file=file,matrix=T)
> head(mydata$dataframe)
  ID collector    date genus species     1      2      3      4      5      6      7      8      
1  1       EOC Jan2012     A       a 0.595 0.1679 0.2232 0.5028 1.2920 0.4237 0.5130 0.2047 
2  2       EOC Jan2012     B       b 0.743 0.3662 0.4697 1.3998 1.7515 1.8165 0.8139 2.8590 

on the other hand, "mydata$coords" provides one only with the landmarks coordinates.


  1. It's great to see a comprehensive R package for geometric morphometrics, especially with integration of new likelihood-based methods.

    I have a slightly tangential question--will there be any addition of methods for accommodating missing and truly absent landmarks?

    1. Hi,
      Thanks for your comment!

      The function: estimate.missing uses thin-plate spline interpolation to estimate locations of missing landmarks on a ‘target’ specimen based on the covariation of the corresponding landmarks on a ‘reference’ specimen. The reference specimen must have a complete set of landmarks, including the landmark (s) missing on the target. Gunz et. al, 2009 and Mitteroecker and Gunz 2009 talk about this problem and solutions. Truly missing landmarks, as you can imagine, are a more complicated problem to think about. If you have not already done so, you might want to take a look at the related sections by Adams et. al, (2004, 2013; 2013 is in press at the moment and not yet available).

      Thanks again for your post!

      Here are the reference to the papers I mentioned:
      Adams DC, Rohlf FJ, and Slice DE. 2004. Geometric morphometrics: ten years of progress following the 'revolution'. Italian Journal of Zoology 71(1):5-16.

      Adams DC, Rohlf FJ, and Slice DE. 2013. A field comes of age: Geometric morphometrics in the 21st century. Hystrix: In Press.

      Gunz, P., P. Mitteroecker, S. Neubauer, G. W. Weber, and F. L. Bookstein. 2009. Principles for the virtual reconstruction of hominin crania. J. Hum. Evol. 57:48-62.

      Mitteroecker P, and Gunz P. 2009. Advances in Geometric Morphometrics. Evolutionary Biology 36(2):235-247.

    2. Thanks for the references and the function estimate.missing(). I've been curious about this topic, especially because it seems analogous in many ways to the problems of missing data and indels in sequence alignment.

      I will consult the references. Many thanks again!