R version of ENMTools