0
私は、次のデータセット(DAT)があります。RでMantel Testを実行するときに "ゼロ距離"エラーを修正するにはどうすればよいですか?
popfst long lat
0.9 77.416667 23.25000
0.2 -6.116667 36.70000
0.3 -77.028333 -12.04333
0.3 -86.929000 40.42400
を、私は、次のデータのマントルピースのテストを行いたいです。私はR
location.distance <- dist(cbind(dat$long,dat$lat))
genetic.distance <- dist(dat$popfst)
as.matrix(location.distance)[1:4,1:4]
as.matrix(genetic.distance)[1:4,1:4]
mantel.rtest(location.distance, genetic.distance, nrepet = 9999)
に次のコードを書かれているために、私は次のエラー
Error in if (any(distmat < tol)) warning("Zero distance(s)") :
missing value where TRUE/FALSE needed
を取得し、最後の行を実行したときしかし、私はこのエラーを修正する方法がわからないです。私はother who haveこれも同様のエラーに直面しようとしていません。助言がありますか?