runRSP: Calculate refined shortest paths between detections

View source: R/runRSP.R

runRSPR Documentation

Calculate refined shortest paths between detections

Description

Estimates the RSP for a series of animals tracked with acoustic transmitters. Intermediate locations between consecutive acoustic detections (either on the same or different receivers) are estimated according to the defined distance and time.step arguments. The error of estimated locations increase proportionally as the animal moves away from the first detection, and decreases as it approaches the second detection (argument er.ad). If the animal is not detected for a long time (default is a daily absence), the detections are broken into a new track (argument max.time).

Usage

runRSP(
  input,
  t.layer,
  coord.x,
  coord.y,
  distance = 250,
  tags = NULL,
  recaptures = FALSE,
  time.step = 10,
  min.time = 10,
  max.time = 24,
  er.ad,
  verbose = FALSE,
  debug = FALSE
)

Arguments

input

The output of one of actel's main functions (explore, migration or residency)

t.layer

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

coord.x, coord.y

The names of the columns containing the x and y positions of the stations in the spatial object.

distance

Distance (in metres) by which RSP point should be spaced (between detections at different stations). Defaults to 250 metres.

tags

Vector of transmitters for which to calculate RSP. By default all transmitters will be analysed.

recaptures

Logical: if TRUE, a recapture.csv dataset containing the recapture locations of tracked animals will be included in the analysis.

time.step

Time lapse (in minutes) between RSP points added between detections at the same station. Defaults to 10 minutes. Must not be larger than min.time.

min.time

Minimum time required between receiver detections (in minutes) for RSP to be calculated. Default to 10 minutes.

max.time

Maximum time allowed between receiver detections (in hours) for RSP to be calculated. Defaults to 24 hours.

er.ad

Increment rate of the position errors for the estimated locations (in metres). If left unset, defaults to 5% of the distance argument.

verbose

Logical: If TRUE, detailed messages and progression are displayed. Otherwise, a single progress bar is shown.

debug

Logical: If TRUE, the function progress is saved to an RData file.

Value

Returns a list of RSP tracks for each transmitter detected, as well as auxiliary information.

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")



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