rangeExplorer: Explore spatial block size

Description Usage Arguments Details Value See Also Examples

Description

This function assists selection of block size. It allows the user to visualise the blocks interactively, viewing the impact of block size on number and arrangement of blocks in the landscape (and optionally on the distribution of species data in those blocks). Slide to the slected block size, and click Apply Changes to change the block size.

Usage

1
2
rangeExplorer(rasterLayer, speciesData = NULL, species = NULL,
  rangeTable = NULL, minRange = NULL, maxRange = NULL)

Arguments

rasterLayer

A RasterLayer, RasterBrick or RasterStack object as background map for visualisation.

speciesData

A SpatialPoints* object containing species data. If provided, the species data will be shown on the map.

species

Character value indicating the name of the field in which the species presence-absence/backgrouns data (0s and 1s) are stored. If provided, species presence and absence data will be shown in different colours.

rangeTable

A data.frame created by spatialAutoRange function containing spatial autocorrelation parameters of all covariates.

minRange

A numeric value to set the minimum possible range for creating spatial blocks. It is used to limit the searching domain of spatial block size.

maxRange

A numeric value to set the maximum possible range for creating spatial blocks. It is used to limit the searching domain of spatial block size.

Details

The only required argument for this function is the rasterLayer. The rest are optional. If the rangeTable is provided, the minimum, maximum and initial ranges for searching the size of spatial blocks will be selected based on the spatial autocorrelation range of covariates. It is also possible to restrict the allowable range of block sizes by using the minRange and maxRanege arguments.

Value

An interactive map with blocks (and optionally species data) superimposed. Note that this can also be opened in a web browser window. When you return to the R console, press “Esc” to return to the prompt.

See Also

spatialBlock; spatialAutoRange for the rangeTable

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
## Not run: 

# load package data
awt <- raster::brick(system.file("extdata", "awt.grd", package = "blockCV"))
# import presence-absence species data
PA <- read.csv(system.file("extdata", "PA.csv", package = "blockCV"))
# make a SpatialPointsDataFrame object from data.frame
pa_data <- sp::SpatialPointsDataFrame(PA[,c("x", "y")], PA, proj4string=raster::crs(awt))

rangeExplorer(rasterLayer = awt) # the only mandatory input

# add species data to add them on the map
rangeExplorer(rasterLayer = awt,
              speciesData = pa_data,
              species = "Species",
              rangeTable = NULL,
              minRange = 30000, # limit the search domain
              maxRange = 100000)


## End(Not run)

adamlilith/blockCV documentation built on May 25, 2019, 12:41 a.m.