# NOT RUN {
data('ecospat.testData')
# data for Soldanella alpina
data.Solalp<- ecospat.testData[c("Soldanella_alpina","ddeg","mind","srad","slp","topo")]
# maxent modelling and cross-validated predictions
# copy maxent.jar file in the right folder
path.from<-system.file("extdata", "maxent.txt", package="ecospat")
path.to <- paste0(system.file(package="dismo"), "/java/maxent.txt")
path.to.renamed <- paste0(system.file(package="dismo"), "/java/maxent.jar")
file.copy(path.from,path.to,overwrite = TRUE)
file.rename(path.to, path.to.renamed)
if (file.exists(path.to.renamed) & require(rJava)) {
me.pred <- ecospat.cv.me(data.Solalp, names(data.Solalp)[1],
names(data.Solalp)[-1], K = 10, cv.lim = 10, jack.knife = FALSE)
}
# }
Run the code above in your browser using DataLab