bin_model | R Documentation |
Function to binarize a continuos model given a threshold
bin_model(model, occs, percent)
model |
A continuos raster model of suitability values |
occs |
Ocurrence data with two colomuns (longitude and latitude). |
percent |
Type of thresholding method. Values go from 0-100 percent of the data. 0 is equivalent to the minimum training presence. |
A binary map of the prediction.
## Not run:
model_p <- system.file("extdata/ambystoma_model.tif",
package = "ntbox")
model <- raster::raster(model_p)
data_p <- system.file("extdata/ambystoma_validation.csv",
package = "ntbox")
data <- read.csv(data_p)
occs <- data[which(data$presence_absence==1),]
binary <- bin_model(model,occs,percent = 5)
raster::plot(binary)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.