‘read.morphologika’ update

January 13, 2013

[This article was first published on geomorph, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

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.

To leave a comment for the author, please follow the link and comment on their blog: geomorph.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.

Search R-bloggers


Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)