[adegenet-forum] question regarding error for mantel.randtest

Jombart, Thibaut t.jombart at imperial.ac.uk
Fri Dec 12 14:04:07 CET 2014


Hi there, 

your matrices don't seem to have the same size. Can you check? 
E.g. 
dim(as.matrix(Dgen))
dim(as.matrix(Dgeo))

Cheers
Thibaut

_______________________________________
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

Hello,

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")
object.size(Dgen)
object.size(Dgeo)
ibd <- mantel.randtest(Dgen,Dgeo)
ibd

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.

Sunita Y.
Ph.D. Student
Univ. of Cincinnati, OH
_______________________________________________
adegenet-forum mailing list
adegenet-forum at lists.r-forge.r-project.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/adegenet-forum


More information about the adegenet-forum mailing list