Learn R Programming

DiversityOccupancy (version 1.0.5)

occupancy.predict: Predicts occupancy for all the species in a batchoccupancy class object

Description

This function takes an batchoccupancy object and predicts occupancy for all species in new data, either a data.frame or a rasterstack.

Usage

occupancy.predict(batch, new.data)

Arguments

batch
A result from the batchoccu
new.data
a rasterstack, or a dataframe containing the same variables as the siteCovs variable in batchoccu

Value

a raster stack with predictions for each species.

See Also

batchoccu

Examples

Run this code
## Not run: 
# #Load the data
# data("IslandBirds")
# data("Daily_Cov")
# data("siteCov")
# data("Birdstack")
# BirdOccupancy <-batchoccu(pres = IslandBirds, sitecov = siteCov, obscov =
# Daily_Cov, spp =  5, form = ~ Day + Wind + Rime + Noise + Clouds ~
# Elev + AgroFo + SecVec + Wetland)
# 
# Occupancy.stack <- occupancy.predict(batch = BirdOccupancy, new.data =
# Birdstack)
# ## End(Not run)

Run the code above in your browser using DataLab