rectHull

0th

Percentile

Rectangular hull model

The Rectangular Hull model predicts that a species is present at sites inside the minimum (rotated) bounding rectangle of a set of training points, and absent outside that rectangle.

Keywords
spatial
Usage
rectHull(p, ...)
Arguments
p

point locations (presence). Two column matrix, data.frame or SpatialPoints* object

...

Additional arguments. See details

Details

You can supply an argument n (>= 1) to get n hulls around subset of the points. This uses k-means to form clusters. To reproduce the clusters you may need to use set.seed.

Value

An object of class 'RectangularHull' (inherits from DistModel-class)

See Also

predict, circleHull, convHull, maxent, domain, mahal

Aliases
  • rectHull
  • rectHull,SpatialPoints-method
  • rectHull,matrix-method
  • rectHull,data.frame-method
  • RectangularHull-class
Examples
# NOT RUN {
r <- raster(system.file("external/rlogo.grd", package="raster"))
# presence data
pts <- matrix(c(17, 42, 85, 70, 19, 53, 26, 84, 84, 46, 48, 85, 4, 95, 48, 54, 66, 
 74, 50, 48, 28, 73, 38, 56, 43, 29, 63, 22, 46, 45, 7, 60, 46, 34, 14, 51, 70, 31, 39, 26), ncol=2)
train <- pts[1:12, ]
test <- pts[13:20, ]
				 
rh <- rectHull(train)
predict(rh, test)

plot(r)
plot(rh, border='red', lwd=2, add=TRUE)
points(train, col='red', pch=20, cex=2)
points(test, col='black', pch=20, cex=2)

pr <- predict(rh, r, progress='')
plot(pr)
points(test, col='black', pch=20, cex=2)
points(train, col='red', pch=20, cex=2)
# }
Documentation reproduced from package dismo, version 1.3-3, License: GPL (>= 3)

Community examples

Looks like there are no examples yet.