| model2sparse | R Documentation | 
model2sparse: Converts a niche model into a diagonal sparse matrix
model2sparse(model, threshold = NULL)
| model | A raster object representing the geographic projection of a niche model. | 
| threshold | A threshold to convert a continuous model into a binary model. | 
A diagonal sparse matrix representing the geographic projection of a niche model.
## Not run: 
model_path <- system.file("extdata/Lepus_californicus_cont.tif",
                          package = "bam")
model <- raster::raster(model_path)
sparse_mod <- bam::model2sparse(model, threshold=0.05)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.