stationchange {mort}R Documentation

Identify most recent station change

Description

Identify the most recent station or location change from passive acoustic telemetry data.

Usage

stationchange(
  data,
  type = "mort",
  ID,
  station,
  res.start = "auto",
  res.end = "auto",
  residences = "auto",
  singles = TRUE,
  drift = FALSE,
  ddd = NULL,
  units = NULL,
  from.station = NULL,
  to.station = NULL,
  verbose = TRUE
)

Arguments

data

a dataframe of residence events. Residence events must include tag ID, location name, start time, and duration.

type

the method used to generate the residence events. Options are "mort", "actel", "glatos", "vtrack", or "manual". If "manual", then user must specify ID, station, res.start, and residences.

ID

a string of the name of the column in data that holds the tag or sample IDs.

station

a string of the name of the column in data that holds the station name or receiver location.

res.start

a string of the name of the column in data that holds the start date and time. Must be specified and in POSIXt if type="manual".

res.end

a string of the name of the column in data that holds the end date and time. Must be specified and in POSIXt or character in the format YYYY-mm-dd HH:MM:SS if type="manual".

residences

a character string with the name of the column in data that holds the duration of the residence events.

singles

specifies if single detections (length of residence event = 0) should be retained. Default is TRUE.

drift

option to account for potential drifting in identifying station changes.

ddd

a dataframe of stations/locations where detected movement between stations may be due to drifting of an expelled tag or dead animal.

units

optional units of the duration of the residence events in data. Required if drift=TRUE. Options are "auto", or "secs", "mins", "hours", "days", or "weeks".

from.station

a string of the name of the column in ddd that contains the station/location names where drifting detections may start from. Must be identical to the station/location names in data.

to.station

a string of the name of the column in ddd that contains the station/location names where drifting detections may move to. Must be identical to the station/location names in data.

verbose

option to display progress bar as function is run. Default is TRUE.

Value

a dataframe with one row for each tag ID, including the date/time of the residence start at the most recent station or location, the date/time of the residence end, and duration of the residence event. All input data fields (e.g., any name, location, or species information that was included with the input data) will be retained.

Examples

stn.change<-stationchange(data=events,type="mort",ID="ID",station="Station.Name",verbose=FALSE)
head(stn.change)

[Package mort version 0.0.1 Index]