backgroundRadius: Background extent restriction for a sequence of distances

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/backgroundRadius.R

Description

Creation of point-grid backgrounds through the establishment of extent limitations for a sequence of distances, from near presence locations to the length of the half diagonal of the bounding that encloses the background (study area).

Usage

1
2
backgroundRadius(xy, background, start = 0.166, by = 0.083,
  unit = c("decimal degrees", "utm"))

Arguments

xy

Data frame or list of data frames with coordinates (each row is a point) —typically species presence data— to be considered as starting points from which different background extents are created.

background

Matrix or list of matrices of background coordinates. Object derived from function OCSVMprofiling (component $absence). Alternatively, object derived from function backgroundGrid (component $xy) if the environmental profiling step is going to be avoided in the pseudo-absence generation proccess).

start

Value for the minimum distance to consider for extent limitations. Default is 0.166

by

Value of the distance to consider from one extent to the following. Default is 0.083

unit

Character indicating the coordinate system of the objects. Default is "decimal degrees", alternatively "utm" can be used

Details

Argument unit is only used to set extent distances in km. This function is aimed at creating backgrounds of different extent for pseudo-absence samplig based on an initial point grid (derived from function OCSVMprofiling or function backgroundGrid). If this function is used for a subsequent application of functions pseudoAbsences and mopaTrain, the last will perform species distribution modeling for each of the extents here established, and will return the fitted model that belongs to the optimum background extent (see references).

Value

List/s of matrixes with xy coordinates, each matrix correspond to a different background extent.

Author(s)

M. Iturbide

References

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.

See Also

mopaTrain, pseudoAbsences, backgroundGrid, OCSVMprofiling

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
## Considering a single group of presence points
data(Q_pubescens)
presences <- Q_pubescens[sample(1:300, size = 100),]

# Define the spatial characteristics of the study area
r <- raster(nrows=50, ncols=50, xmn=-10, xmx=20, ymn=35, ymx=65, vals = rep(1, 50*50))

# Background of the whole study area
bg <- backgroundGrid(r)

# Partition of the study area
bg.extents <- backgroundRadius(xy = presences, background = bg$xy, 
                            start = 0.166, by = 0.083*50, unit = "decimal degrees")



## Considering more than one groups of presence points
data(Oak_phylo2)

# Obtaining the raster that defines the spatial characteristics of the study area
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 of the whole study area
bg <- backgroundGrid(r)

# Partition of the study area
bg.extents <- backgroundRadius(xy = Oak_phylo2, background = bg$xy, 
start = 0.166, by = 0.083*10, unit = "decimal degrees")

mopa documentation built on May 2, 2019, 6:47 a.m.