-------- Original Message --------
Subject: code to convert matrix to array
Date: Thu, 22 Mar 2012 11:04:10 -0400
From: ppi...@uniroma3.it
To: morphmet@morphometrics.org
CC: morphmet <morphmet@morphometrics.org>
Hi all,
I write to ask if someone can sugest me some lines of
code to convert a
matrix of n_inds x (k_lands*m_dim) [that is a
classical matrix from ...morphoJ ,for example]
for example (in two dimension, but it can be in 3d)
n1 x1 y1 x2 y2 ....xn yn
n2
n3
n...
in an array of n matrices structured in k_lands x m_dim
to be used for existing gpa R routines
I tried:
ew<-matrix(n°inds,n°lands*n°dim)
er<-er<-as.vector(t(ew))
er2<-array(er,dim=c(n°lands,n°dim,n°inds))
Maybe in past messages of morphmet there in the
answer, I took a look...but I did not find the proper
solution
thankyou in advance
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