bound: Calculate the approximate boundary of 2D Euclidean data

boundR Documentation

Calculate the approximate boundary of 2D Euclidean data

Description

Calculate the approximate boundary of 2D Euclidean data

Usage

bound(
  object,
  coord.names = c("x", "y"),
  precision = 1,
  plotting = F,
  encase = NA,
  smoothed = F
)

Arguments

object

Either a data frame containing the spatial locations of each point or a scampr model object. In the latter case the model's data will be used.

coord.names

a vector of length 2 containing character strings describing the column names of the coordinates in any data provided. First coordinate name should refer to the horizontal axis. Will be over-ridden when object is a scampr model.

precision

an integer value that determines the number of decimal places to search through. Controls the precision of the approximate boundary, 1 or 2 should be adequate. The higher (larger) the precision the slower the result is obtained.

plotting

a logical indicating whether the results should be plotted. Helpful for trialing presicion and/or encasing.

encase

a numeric value indicating the amount of encasing of the data should occur. This will essentially add a buffer to the boundary.

smoothed

a logical indicating whether or not the boundary should be smoothed using a Loess' smoother.

Value

a data frame of 2 columns for each coordinate.

Examples

# Get the gorilla nesting data
dat <- gorillas

# Calculate a boundary for the data
bnd <- bound(dat, coord.names = c("x", "y"))

ElliotDovers/scampr documentation built on March 17, 2024, 3:27 p.m.