# NOT RUN {
#Download the presence data
data('ctenocidaris.nutrix')
occ <- ctenocidaris.nutrix
# select longitude and latitude coordinates among all the information
occ <- ctenocidaris.nutrix[,c('decimal.Longitude','decimal.Latitude')]
#Download some environmental predictors
data(predictors2005_2012)
envi <- predictors2005_2012
envi
#Create a SDMtab matrix
SDMtable_ctenocidaris <- SDMPlay:::SDMtab(xydata=occ,
predictors=predictors2005_2012,
unique.data=FALSE,
same=TRUE)
#only run if the maxent.jar file is available, in the right folder
#jar <- paste(system.file(package="dismo"), "/java/maxent.jar", sep='')
# Check first if maxent can be run (normally not part of your script)
# (file.exists(jar) & require(rJava)) == TRUE ??
# rJava may pose a problem to load automatically within this package
# please load it manually using eventually the archives available from CRAN
# Run the model
#model <- SDMPlay:::compute.maxent(x=SDMtable_ctenocidaris, proj.predictors=envi)
# Plot the map prediction
library(grDevices) # add nice colors
#palet.col <- colorRampPalette(c('deepskyblue','green','yellow','red'))(80)
#'raster::plot(model$raster.prediction, col=palet.col)
data('worldmap')
# add data
points(worldmap, type="l")
#points(occ, col='black',pch=16)
# Get the partial dependance curves
#dismo::response(model$response)
# Get the percentage of contribution of each variable to the model
#plot(model$response)
# Get all the information provided by the model on a html document
#model$response
# }
Run the code above in your browser using DataLab