truncate_sheds: Truncate Detection Histories

Description Usage Arguments Value Author(s)

View source: R/sheds.R

Description

Truncates the detection histories to either a number of days or hours after the fish first visit a station, or if a timestamp is provided, to that timestamp.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
truncate_sheds(
  raw_detection_df,
  TagIDs,
  keep_last = 2L,
  units = "days",
  time_stamps = NULL,
  TagID_col = "TagID",
  Station_col = "GroupedStn",
  DateTime_col = "DateTimePST"
)

Arguments

raw_detection_df

data.frame of raw detection histories

TagIDs

vector, the TagIDs to truncate

keep_last

integer, amount of detections to keep in the final station history

units

character, either days or hours

time_stamps

Optional, if provided these are used as the cutoff for each tagID. There must be one time_stamp for each tagID. The function will only include DateTimes which are less or equal to this timestep in the results

TagID_col

character, the column name for the TagID

Station_col

character, the column name for the station

DateTime_col

character, the column name for DateTime

Value

data.frame, with shed tags truncated

Author(s)

Matt Espe


fishsciences/ybt documentation built on March 11, 2021, 8:45 a.m.