bbmm.contour: Create density contours from a Brownian bridge movement model

Description Usage Arguments Value Author(s) See Also Examples

Description

Calculates and (optionally) plots density contours from a utilization distribution.

Usage

1

Arguments

x

An object of class bbmm, which is a list with vectors x, y and probabilities.

levels

A numeric vector of desired contour levels (e.g., c(95, 99)).

locations

(optional) data frame or matrix of x and y coordinates for original location data used to estimate the Brownian bridge and utilization distribution surface.

plot

Logical. If TRUE, the countour plot is drawn.

Value

An list with four components.

Components of the returned object are as follows:

contour

Requested contour level(s).

z

values that separate the specified contour level(s).

Author(s)

Ryan Nielson, Hall Sawyer, and Trent McDonald (WEST, Inc., www.west-inc.com)

Maintainer: Ryan Nielson [email protected]

See Also

brownian.bridge

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
data(locations)
BBMM <- brownian.bridge(x=locations$x, y=locations$y, 
            time.lag=locations$time.lag[-1], location.error=20, 
            cell.size=50)
contours <- bbmm.contour(BBMM, levels=c(95, 99), locations=locations, plot=TRUE)

# Create a shapefile with contour lines
# Not run: library(maptools)
# Not run: library(raster)
# Not run: out <- data.frame(x=BBMM$x,y=BBMM$y,z=BBMM$probability)
# Make sure the data is properly projected
# Not run: out.raster <- rasterFromXYZ(out,crs=CRS("+proj=utm +zone=12 +datum=WGS84"),digits=2) 
# Not run: raster.contour <- rasterToContour(out.raster,levels=contours$Z) 
# Not run: raster.contour <- spChFIDs(raster.contour,paste(c(95, 99),"% Contour Line",sep="")) 
# Not run: library(rgdal) # can't be loaded before CRS call in line above
# Not run: writeOGR(obj=raster.contour,dsn=".",layer="BBMM",driver="ESRI Shapefile")

BBMM documentation built on May 2, 2019, 6:47 a.m.