getDistances: Get total distances travelled

View source: R/get.R

getDistancesR Documentation

Get total distances travelled

Description

Obtain the total distances travelled (in metres) for the tracked animals, using only the receiver locations and also adding the RSP positions.

Usage

getDistances(input, t.layer)

Arguments

input

RSP dataset as returned by RSP.

t.layer

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

Value

A dataframe containing the total distances travelled during each RSP track.

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 travelled
distance.data <- getDistances(rsp.data, t.layer = tl)



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