I have a fst value (molecular distance indices) between population (which is not calculate from molecular data, original raw data is misiing) but I have got environmental data and location (including lon and lat) I would like to use Mantel test (r is better)to conduct correlation of these distance matrix. However, I cannot got packages go through and it seems problem is on fst table I made a csv table as below
1 2 3 4 5 6
0.0282 0 0.0266 0.5122 0.4784 0.5553
0.057 0.0266 0 0.4426 0.4042 0.5448
0.318 0.5122 0.4426 0 0.4527 0.6017
0.3412 0.4784 0.4042 0.4527 0 0.4171
0.4462 0.5553 0.5448 0.6017 0.4171 0
And I use the code to import or calculate the dist matrix
library(ade4)
setwd(choose.dir())
df = read.table("hynobins_climate.csv", header= T,sep=",")
station.dists <- dist(cbind(df$lon, df$lat))
#This works fine for calculation of geo distance
fst=read.table("mtFst.csv",header=T)
mantel.rtest(station.dists, fst, nrepet = 9999)
It returns error message : Error in mantel.rtest(station.dists, fst, nrepet = 9999) : Object of class 'dist' expected
How could I conduct my mantel test while I only have calculated fst instead of raw data (and I can conduct suite packages to generate molecular distance matrix.