Identify the most recent station or location change from passive acoustic telemetry data.
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
)
a dataframe of residence events. Residence events must include tag ID, location name, start time, and duration.
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
.
a string of the name of the column in data
that holds the tag or
sample IDs.
a string of the name of the column in data
that holds the
station name or receiver location.
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"
.
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"
.
a character string with the name of the column in data
that holds the duration of the residence events.
specifies if single detections (length of residence event = 0)
should be retained. Default is TRUE
.
option to account for potential drifting in identifying station changes.
a dataframe of stations/locations where detected movement between stations may be due to drifting of an expelled tag or dead animal.
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".
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
.
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
.
option to display progress bar as function is run. Default is TRUE.
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.
stn.change<-stationchange(data=events,type="mort",ID="ID",station="Station.Name",verbose=FALSE)
head(stn.change)
#> ResidenceStart Station.Name ID ResidenceEnd
#> 35 2005-06-25 21:26:12 10 A 2005-06-26 09:01:17
#> 36 2005-07-01 05:28:31 1 B 2005-07-01 05:28:31
#> 91 2004-06-19 15:31:47 9 C 2004-06-19 19:10:01
#> 93 2004-08-31 16:48:00 5 D 2004-08-31 17:38:18
#> 101 2004-07-15 21:09:22 5 E 2004-10-12 21:44:11
#> 106 2005-06-28 21:12:58 1 F 2005-10-09 20:28:05
#> ResidenceLength.days
#> 35 0.48269676
#> 36 0.00000000
#> 91 0.15155093
#> 93 0.03493056
#> 101 89.02417824
#> 106 102.96883102