‘read.morphologika’ update

January 13, 2013
By

(This article was first published on geomorph, and kindly contributed to R-bloggers)


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 on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...



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.

Sponsors

Mango solutions



plotly webpage

dominolab webpage



Zero Inflated Models and Generalized Linear Mixed Models with R

Quantide: statistical consulting and training

datasociety

http://www.eoda.de





ODSC

ODSC

CRC R books series





Six Sigma Online Training









Contact us if you wish to help support R-bloggers, and place your banner here.

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)