det_eff: Computes the detection efficiency of antennas or arrays

Description Usage Arguments Details Value Examples

View source: R/det_eff.R

Description

Function that computes the detection efficiency of antennas or arrays based on the array configuration and assumptions of the direction of fish movement (up, down or resident). Data can be summarized by year, month, week, day or hour.

Usage

1
2
3
det_eff(data, resolution = NULL, by_array = FALSE,
  array_sequence = NULL, direction, start_date = NULL,
  end_date = NULL)

Arguments

data

telemetry dataset created using old_pit, new_pit or array_config

resolution

summarize by year, month, week, day or hour (optional)

by_array

summarize by array (TRUE) or antenna (FALSE)

array_sequence

vector of array names in order from downstream to upstream

direction

user-specified direction of fish movement ("up", "down", or "resident"; required)

start_date

start date of period of interest, default is first date in dataset

end_date

end date of period of interest, default is last date in dataset

Details

Function computes detection efficiency for readers or arrays. If calculating detection efficiency for readers, antennas for each reader must be numbered in consecutive order from downstream to upstream (see Examples). If antennas were not numbered correctly in the field, users can apply the array_config function to restructure the configuration of antennas.

Users can also summarize detection efficiency by array through the argument by_array. Note that individual antennas do not need to be numbered in consecutive order if detection efficiency is being summarized by array. If by_array = TRUE, the user must list the array names in order from downstream to upstream using the array_sequence argument.

The argument direction is required and must either be "up", "down", or "resident". Up and down movements are relative to the direction of flow (i.e., up would be against the flow of the river), while resident movements occur in both directions. Arguments start_date and end_date, if specified, must be entered as yyyy-mm-dd hh:mm:ss. Default for the resolution argument will summarize detection efficiency over the entire dataset. Users can apply the det_eff function to the original dataset created by the old_pit or new_pit function, or use an updated dataset created by the array_config function.

Value

Data frame summarizing the detection efficiency of antennas or arrays.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
# Load test dataset containing detections from a multi reader with two antennas
oregon_rfid <- new_pit(data = "oregon_rfid", test_tags = NULL, print_to_file = FALSE, time_zone = "America/Vancouver")

# Summarize by individual antenna and by month for fish assumed to be moving upstream
det_eff(data = oregon_rfid, resolution = "month", by_array = FALSE, direction = "up")

# Summarize by individual antenna and by week for fish assumed to be moving upstream with a start date of 2016-10-11 08:45:00
det_eff(data = oregon_rfid, resolution = "week", by_array = FALSE, direction = "up", start_date = "2016-10-11 08:45:00")

# Summarize by individual antenna and by day for fish assumed to be moving downstream
det_eff(data = oregon_rfid, resolution = "day", by_array = FALSE, direction = "down")

# Summarize by individual antenna and by month for fish assumed to be resident
det_eff(data = oregon_rfid, resolution = "month", by_array = FALSE, direction = "resident")

# Example study:
# Studying an upstream migration in a river that contains two, two-antenna arrays.
# The most downstream array is array_one, followed by array_two upstream.
# Summarize by array and by month for fish assumed to be moving upstream
det_eff(data = multi_array, resolution = "month", by_array = TRUE, array_sequence = c("array_one", "array_two"), direction = "up")

InStreamFisheries/PITR documentation built on Jan. 7, 2021, 1:02 p.m.