## Not run:
# #Load the data
# data("IslandBirds")
# data("Daily_Cov")
# data("siteCov")
# data("Birdstack")
#
# #Model the abundance for 5 bat species and calculate alpha diversity from that
#
# #Model the abundance for 5 bat species and calculate alpha diversity from that
#
# BirdDiversity <-diversityoccu(pres = IslandBirds, sitecov = siteCov,
# obscov = Daily_Cov,spp = 5, form = ~ Day + Wind + Time ~ Elev + Wetland + Upland)
#
# #Select the best model that explains diversity using genetic algorithms
# set.seed(123)
# glm.Birdiversity <- model.diversity(BirdDiversity, method = "g")
#
# # get the area where the first two bird species are most abundant
# # and the diversity is high
#
# library(rgdal)
# Selected.area <- diversity.predict(model = BirdDiversity, diverse = glm.Birdiversity,
# new.data = Birdstack, quantile.nth = 0.65, species =
# c(TRUE, TRUE, FALSE, FALSE, FALSE))
#
# Selected.area
# ## End(Not run)
Run the code above in your browser using DataLab