[R] Matrix Row name Compatibility

From: Charles Willis <willis.charlie_at_gmail.com>
Date: Sun, 09 Mar 2008 15:44:39 -0400


Hello,

I am trying to preform a comparative analysis using the partial mantel method. However, i am having trouble creating compatible matrices. I can create matrices from my numerical data using the 'distance(x, method)' function from ecodist, but the row/column names are out put as numbers. While when i create a phyo-distance matrix using 'cophenetic(x)' from APE, the row/column names are the taxa names. Different data sets incorporate different taxa from the tree, which requires me to prune it for each data set, meaning I cannot just convert the taxa names to corresponding numbers in the data matrix (because the numbers will change for each data set).

Anyways, my question is, is there an easy way to label the row/column names with the taxa names? A different distance matrix function perhaps? When I import the data I convert the taxa names to row names (row.names(data) <- as.character(data$taxanames). Why these don't transfer over when I create a distance matrix, I don't know.

Thank you,
Charlie

-- 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Charles G. Willis Department of Organismic and Evolutionary Biology 22 Divinity Ave Cambridge MA 02139 HP (857) 488-2506 WP (617) 496-3890 cgwillis_at_oeb.harvard.edu http://www.people.fas.harvard.edu/%7Ecgwillis/
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[[alternative HTML version deleted]] ______________________________________________ R-help_at_r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Received on Sun 09 Mar 2008 - 19:48:02 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sun 09 Mar 2008 - 20:30:20 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive