[R] Mantel test
David L Carlson
dcarlson at tamu.edu
Mon May 4 21:48:59 CEST 2015
Assuming the 'matrix' format is a symmetrical distance 'matrix' stored as a data frame (which read.csv creates) rather a rectangular data 'matrix,' you can convert it to a dist object with as.dist().
?dist
-------------------------------------
David L Carlson
Department of Anthropology
Texas A&M University
College Station, TX 77840-4352
-----Original Message-----
From: R-help [mailto:r-help-bounces at r-project.org] On Behalf Of Nick Jeffery
Sent: Monday, May 4, 2015 10:49 AM
To: r-help at r-project.org
Subject: [R] Mantel test
Dear R users,
I'm having trouble getting my data into R in the correct format to run a
Mantel test.
I'm testing genome size differences by genetic distances of the 28S gene
for ~30 species. I'm able to get my genome size data (as a single column of
data) into matrix and dist formats in R but the genetic distances output by
MEGA are already in 'matrix' format so I don't know how to load this CSV
file into R without it calculating new genetic distances when I convert it
to the dist form required by the test.
Thanks in advance,
Nick
--
Nick Jeffery, PhD Candidate
Integrative Biology
SCIE 1453
University of Guelph
Guelph, Ontario, Canada
[[alternative HTML version deleted]]
______________________________________________
R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
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.
More information about the R-help
mailing list