points.habitat: Define a set of locations with a circular habitat

Description Usage Arguments Value Examples

View source: R/habitat.R

Description

Given a set of points (x,y), create a circular habitat centred on each point, with value inside within dist.inside and value outside otherwise.

Usage

1
2
## S3 method for class 'habitat'
points(x, y, pts, dist.inside, inside = 1, outside = 0.8)

Arguments

x

x coordinate

y

y coordinate

pts

Two column matrix or dataframe of x and y coordinates for a set of points

dist.inside

Distance from each point to set value inside

inside

Value to set for locations within dist.inside of a point

outside

Value to set for locations further than dist.inside from a point.

Value

Habitat value for each location. This function is used in conjunction with as.im to produce an image that defines the habitat.

Examples

1
2
3
4
pts <- matrix(data=c(-60,3,-80,-77,30,30,25,10,-40,-30),ncol=2,byrow=T)
hab.win <- owin(c(-100,100),c(-100,100),unitname="metres")
Z <- as.im(points.habitat,hab.win,pts,dist.inside=20,inside=1.0,outside=0.9)
plot(Z)

pwhigham/spatibm documentation built on Aug. 30, 2019, 1:16 p.m.