##set up site-pair table using the southwest data set
sppData <- southwest[, c(1,2,14,13)]
envTab <- southwest[, c(2:ncol(southwest))]
sitePairTab <- formatsitepair(sppData, 2, XColumn="Long", YColumn="Lat", sppColumn="species",
siteColumn="site", predData=envTab)
##create GDM
gdmMod <- gdm(sitePairTab, geo=TRUE)
##summary of GDM
summary(gdmMod)
Run the code above in your browser using DataLab