direction_total: Summarizes upstream and downstream movements on arrays

Description Usage Arguments Details Value Examples

View source: R/direction_total.R

Description

Function summarizes upstream or downstream movements of each fish (based on their first and last movements) on each array over a user-defined period of time. This function can assist in determining residence time between unique arrays. Data can be summarized by year, month, week, day or hour.

Usage

1
2
direction_total(data, resolution = NULL, start_date = NULL,
  end_date = NULL)

Arguments

data

telemetry dataset created using old_pit, new_pit or array_config

resolution

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

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

direction_total summarizes movements by array. Multiple arrays can be present in data, and each array can have up to four antennas that must be ordered sequentially from downstream (1) to upstream (4). If no arrays are specified, direction_tota defaults the reader names to array names and summarizes by reader/array. Any single antenna data that have not been renamed using array_config (i.e., antenna number is NA) will not be included in the direction_total function.

Users can apply the direction_total 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. 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 upstream and downstream movements over the entire time period present in the dataset.

Value

Data frame summarizing upstream and downstream movements on arrays.

Examples

1
2
3
4
5
6
7
8
# 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 month
direction_total(data = oregon_rfid, resolution = "month")

# Summarize by year with a start date of 2015-11-11 10:30:00
direction_total(data = oregon_rfid, resolution = "year", start_date = "2015-11-11 10:30:00")

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