----- Forwarded
message from
"Fabio de A. Machado"
Date: Tue, 26 Jun
2012 22:29:37 -0400
From: "Fabio de A. Machado"
Reply-To: "Fabio de A. Machado"
Subject: Re: reading nts file format in R
To:
morphmet@morphometrics.org
The next script should do the trick.
It is from Claude's book, but I'm not sure if it is exactly the
same.
lm.conf<-scan("align.nts",what="char",quote="",sep="\n", comment.char="\"")
lm.conf1<-lm.conf[1]
l1<- unlist
(strsplit(lm.conf1, "="))
l2<- unlist
(strsplit(lm.conf1, " "))
if(length(l1)==1) {k<-2} else {k<-as.numeric(l1[2])}
lm.conf2<-lm.conf[-1]
cat(lm.conf2, file="lm.temp.txt")
data<-matrix(scan("lm.temp.txt"), as.numeric (l2[2]), as.numeric
(l2[3]), byrow=TRUE)
unlink("lm.temp.txt")
conf<-array(t(data),dim=c(k,as.numeric(l2[3])/k,l2[2]))
conf<-aperm(conf,c(2,1,3))
library(shapes)
plotshapes(conf)
Best,
-----------------------------------------------------
Fabio Andrade Machado
Laboratório de Evolução de Mamíferos
Departamento de Genética e Biologia Evolutiva
Universidade de São Paulo
Rua do Matão, trav.14, nº277,
Fabio Andrade Machado
Laboratório de Evolução de Mamíferos
Departamento de Genética e Biologia Evolutiva
Universidade de São Paulo
Rua do Matão, trav.14, nº277,
Edificio Minas Gerais
+55 11 82631029
Google Scholar: http://scholar.google.com/citations?hl=en&user=2l6-VrQAAAAJ
On 26/06/2012, at 13:35, morphmet_modera...@morphometrics.org
wrote:
----- Forwarded message from ppi...@uniroma3.it -----
Date: Tue, 19 Jun 2012 06:42:52 -0400
From: ppi...@uniroma3.it
Reply-To: ppi...@uniroma3.it
Subject: reading nts file format in R
To: morphmet@morphometrics.org
Hi folks,
someones knows if exists a code to read nts files in R?
Thankyou
Paolo
--
Paolo Piras
Center for Evolutionary Ecology
and
Dipartimento di Scienze Geologiche, Università Roma Tre
Largo San Leonardo Murialdo, 1, 00146 Roma
Tel: +390657338000
email: ppi...@uniroma3.it
----- End forwarded message -----
----- End forwarded message -----
----- End forwarded message -----
----- End forwarded message
-----