hotMove: hotMove

Description Usage Arguments Details Value See Also Examples

View source: R/hotMove.R

Description

Detection of geographic regions of samples using a pixel based approach.

Usage

1
hotMove(x, y, return.shp = FALSE)

Arguments

x

Object of class SpatialPoints of SpatialPointsDataFrame.

y

Grid resolution. Unit depends on x projection.

return.shp

Logical. Should the function return polygons of the regions? Default is FALSE.

Details

First, the function builds a raster with a resolution equal to y and the spatial extent of x. Then, each point in x is converted into pixel coordinates. Based on the unique pixel coordinates, the function then evaluates the spatial connectivity of these pixels using a 8-neighbor connected component labeling algorithm to detect regions. Finally, the ID's are related back to each individual data point in x based on their pixel coordinates and - if return.shp is TRUE - a polygon is derived from the convex hull of the points within each region. The output of the function consists of:

Value

A List containing a vector of region ID's per data point ($indices) and region polygons ($polygons).

See Also

sampleMove hotMoveStats

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
{

require(raster)

# reference data
data(longMove)

# extract regions
hm <- hotMove(longMove, 0.1)

}

RRemelgado/rsMove documentation built on June 7, 2020, 5:12 p.m.