Description Usage Arguments Details Value Author(s) References Examples
View source: R/backgroundGrid.R
Creates the background coordinates used for defining the study area and for generating pseudo-absences.
1 | backgroundGrid(raster, spatial.subset = NULL)
|
raster |
Raster object with projection ( |
spatial.subset |
Object of class extent (see |
If a data.frame, matrix or a list of the previous is passed to spatial.subset
the bounding coordinates
are extracted to delimit the background. For example, to bound the study area to the spatial distribution of a species.
A list with a SpatialPolygons object and a matrix of the background coordinates
M. Iturbide
Iturbide, M., Bedia, J., Herrera, S., del Hierro, O., Pinto, M., Gutierrez, J.M., 2015. A framework for species distribution modelling with improved pseudo-absence generation. Ecological Modelling. DOI:10.1016/j.ecolmodel.2015.05.018.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | ## Load presences
data(Oak_phylo2)
## Load rasters
destfile <- tempfile()
data.url <- "https://raw.githubusercontent.com/SantanderMetGroup/mopa/master/data/biostack.rda"
download.file(data.url, destfile)
load(destfile, verbose = TRUE)
projection(biostack$baseline) <- CRS("+proj=longlat +init=epsg:4326")
r <- biostack$baseline[[1]]
## Background around a set of coordinates
bg.species <- backgroundGrid(r, Oak_phylo2)
## Background of a subdomain of the study area
bg.subdomain <- backgroundGrid(r, extent(c(-10, 30, 35, 65)))
## Background of the whole study area
bg <- backgroundGrid(r)
# plot(bg$xy)
# plot(bg.subdomain$xy)
# plot(bg.species$xy$H11)
plot(bg.species$xy$H01)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.