gsGOCDistance: Find the grains of connectivity network distance

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

View source: R/grainscape.R

Description

Given a gsGOC object find the shortest network distance between pairs of points using the GOC graph. This can be used as an effective distance for landscape connectivity assessments.

Usage

1
gsGOCDistance(gsGOC, coords, weight = "meanWeight")

Arguments

gsGOC

A gsGOC object produced by gsGOC

coords

A two column matrix or a SpatialPoints object giving the coordinates of points of interest

weight

The GOC graph link weight to use in calculating the distance. Please see details for explanation.

Details

GOC graphs with the following links weights can be used:

weight="meanWeight" links represent the mean weight of all links connecting MPG nodes in neighbouring polygons. It is recommended.
weight="maxWeight" links represent the maximum weight of all links connecting MPG nodes in neighbouring polygons.
weight="minWeight" links represent the minimum weight of all links connecting MPG nodes in neighbouring polygons.
weight="medianWeight" links represent the median weight of all links connecting MPG nodes in neighbouring polygons.
weight="numEdgesWeight" links represent the number of links connecting MPG nodes in neighbouring polygons.
weight="eucCentroidWeight" links represent the Euclidean distances between the centroids of neighbouring polygons.

Value

A list object giving a distance matrix for each threshold in the gsGOC object. Distance matrices give the pairwise grains of connectivity network distances between sampling locations. Matrix indices correspond to rows in the coords matrix.

Author(s)

Paul Galpern (pgalpern@gmail.com)

References

Fall, A., M.-J. Fortin, M. Manseau, D. O'Brien. (2007) Spatial graphs: Principles and applications for habitat connectivity. Ecosystems. 10:448:461

Galpern, P., M. Manseau, P.J. Wilson. (2012) Grains of connectivity: analysis at multiple spatial scales in landscape genetics. Molecular Ecology 21:3996-4009.

See Also

gsGOC, gsGOCPoint

Examples

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

## Load raster landscape
tiny <- raster(system.file("extdata/tiny.asc", package="grainscape"))

## Create a resistance surface from a raster using an is-becomes reclassifyification
tinyCost <- reclassify(tiny, rcl=cbind(c(1, 2, 3, 4), c(1, 5, 10, 12)))

## Produce a patch-based MPG where patches are resistance features=1
tinyPatchMPG <- gsMPG(cost=tinyCost, patch=tinyCost==1)

## Extract a representative subset of 5 grains of connectivity
tinyPatchGOC <- gsGOC(tinyPatchMPG, nThresh=5)

## Three sets of coordinates in the study area
loc <- cbind(c(30, 60, 90), c(30, 60, 90))

## Find the GOC network distance matrices between these poitns
## for each of the 5 grains of connectivity
tinyDist <- gsGOCDistance(tinyPatchGOC, loc)

## End(Not run)

grainscape documentation built on May 2, 2019, 6:48 p.m.