getDistPoint: Calculate in-water distances from RSP locations to a point of...

View source: R/get.R

getDistPointR Documentation

Calculate in-water distances from RSP locations to a point of reference

Description

Calculate in-water distances from RSP locations to a point of reference

Usage

getDistPoint(input, point, t.layer, transmitter = NULL)

Arguments

input

The output of runRSP

point

Point of reference (lon, lat) to where distances will be calculated.

t.layer

A transition layer. Can be calculated using the function transitionLayer.

transmitter

The animal(s) of interest for calculating distances. If not specified, by default, distances will be calculated for all animals in the dataset.

Value

The RSP detections object with a distance (in metres) column appended.

Examples


# Import river shapefile
water <- actel::shapeToRaster(shape = paste0(system.file(package = "RSP"), "/River_latlon.shp"), 
size = 0.0001, buffer = 0.05) 

# Create a transition layer with 8 directions
tl <- actel::transitionLayer(x = water, directions = 8)

# Import example output from actel::explore() 
data(input.example) 

# Run RSP analysis
rsp.data <- runRSP(input = input.example, t.layer = tl, coord.x = "Longitude", coord.y = "Latitude")

# Calculate distances to a point of reference
df.dist <- getDistPoint(input = rsp.data, point = c(151.0291, -33.81771), t.layer = tl)



YuriNiella/RSP documentation built on Feb. 2, 2024, 5:03 a.m.