[adegenet-forum] question regarding error for mantel.randtest
t.jombart at imperial.ac.uk
Fri Dec 12 14:04:07 CET 2014
your matrices don't seem to have the same size. Can you check?
From: adegenet-forum-bounces at lists.r-forge.r-project.org [adegenet-forum-bounces at lists.r-forge.r-project.org] on behalf of Yadav-Pauletti, Sunita (yadavps) [yadavps at mail.uc.edu]
Sent: 12 December 2014 05:16
To: adegenet-forum at lists.r-forge.r-project.org
Subject: [adegenet-forum] question regarding error for mantel.randtest
I would like to test isolation by distance in my dataset and have tried the following code:
genfile <- read.genalex(filepath, ploidy=2, geo=TRUE, region=FALSE) #read file
toto <- genind2genpop(genfile,miss="0")
Dgen <- dist.genpop(toto,method=2)
Dgeo <- dist(genfile$other$xy, method="euclidean")
ibd <- mantel.randtest(Dgen,Dgeo)
The data file (genfile) is in a GenAlEx format. However, I get the following error; I think it is related to the size of matrices for Dgen and Dgeo but I am unsure why the sizes would be off, is there something wrong with the code above (I got it from the adegenet tutorials)?
> Error in mantel.rtest(Dgen, Dgeo) : Non convenient dimension
Thank you for your help.
Univ. of Cincinnati, OH
adegenet-forum mailing list
adegenet-forum at lists.r-forge.r-project.org
More information about the adegenet-forum