## Not run:
# #test with Brazil nut (limits from FAO ecocrop)
# #temperature: (12) 20-36 (40)
# #annnual rainfall: (1400) 2400-2800 (3500)
#
# # get predictor variables
# library(dismo)
# predictor.files <- list.files(path=paste(system.file(package="dismo"), '/ex', sep=''),
# pattern='grd', full.names=TRUE)
# predictors <- stack(predictor.files)
# # subset based on Variance Inflation Factors
# predictors <- subset(predictors, subset=c("bio5", "bio6", "bio12"))
# predictors
# predictors@title <- "base"
#
# Brazil.ecocrop <- ensemble.ecocrop.object(temp.thresholds=c(20, 36, 12, 40),
# rain.thresholds=c(2400, 2800, 1400, 3500),
# annual.temps=FALSE, name="Bertholletia_excelsa")
# Brazil.ecocrop
# ensemble.ecocrop(predictors, ecocrop.object=Brazil.ecocrop)
# ## End(Not run)
Run the code above in your browser using DataLab