----- Forwarded message from Dean Adams <[email protected]> -----

Date: Mon, 1 Apr 2013 09:30:01 -0400
From: Dean Adams <[email protected]>
Reply-To: Dean Adams <[email protected]>
Subject: Re: naming dimensions of an array created by arrayspecs {geomorph}
To: [email protected]

Hi Karl,

To link the phylogeny and the shape data in geomorph, the specimens must have the same names as are found on the tips of the phylogeny.  This can be specified by adding dimension names to the 3rd dimension of the 3D array of landmark shape data. Do this as:

dimnames (mydata)[3]<-species.names

where 'mydata' represents your 3D array of shape data and 'species.names' is a vector containing the names as spelled exactly in the phylogeny.

Best,

Dean
--
Dr. Dean C. Adams
Professor
Department of Ecology, Evolution, and Organismal Biology
Department of Statistics
Iowa State University
Ames, Iowa
50011
www.public.iastate.edu/~dcadams/
phone: 515-294-3834



On 3/31/2013 12:39 AM, [email protected] wrote:


----- Forwarded message from "Fetter, Karl" <[email protected]> -----

Date: Sat, 30 Mar 2013 21:48:41 -0400
From: "Fetter, Karl" <[email protected]>
Reply-To: "Fetter, Karl" <[email protected]>
Subject: naming dimensions of an array created by arrayspecs {geomorph}
To: "[email protected]" <[email protected]>

Hello Morphometrics World,

I am attempting to use plotGMPhyloMorphoSpace() from geomorph to plot my phylo tree in shape space. I have a tree and array of coordinates of the same length but with different names. I'm getting this error messager from R: "subscript out of bounds"; and it must be due to the different names in the tree and the coordinates. 

My question is how do I rename the dimensions of an array created by arrayspecs in R? I tried the obvious names(coords)<-my.names , but this totally destroyed the coords array. 

I can create an array w/ array(coords, dimnames=my.names, dim=???), but the dimensions are not right. My coordinate data set has the dimensions of 10 x 2 x 60, but I can't seem to get array to accept this. 

So I have two options, rename the array I created w/ arrayspecs, or correctly supply the 'dim=' argument with the array() function.

Any ideas?

Thanks,

Karl Fetter

*****************************************************************
Graduate Student
UNC Herbarium
Department of Biology
University of North Carolina
301 Coker Hall
Chapel Hill, NC 27599
Phone: 336-420-0339


----- End forwarded message -----








----- End forwarded message -----



Reply via email to