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

Yadav-Pauletti, Sunita (yadavps) yadavps at mail.uc.edu
Fri Dec 12 06:16:01 CET 2014


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.

Sunita Y.
Ph.D. Student
Univ. of Cincinnati, OH

More information about the adegenet-forum mailing list