Identifies potential mortalities or expelled tags from passive acoustic telemetry data. Mortalities are identified based on thresholds derived from the dataset itself.
morts(
data,
type = "mort",
ID,
station,
res.start = "auto",
res.end = "auto",
method = "all",
units = "auto",
residences = "auto",
singles = TRUE,
backwards = FALSE,
drift = "none",
ddd = NULL,
from.station = NULL,
to.station = NULL,
drift.cutoff = NULL,
drift.units = NULL,
season.start = NULL,
season.end = NULL,
season.overlap = TRUE,
morts.prev = NULL,
verbose = TRUE
)
a dataframe of residence events. Residence events must include tag ID, location name, start time, end 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
, res.end
, residences
, and units
.
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 or character in the format
YYYY-mm-dd HH:MM:SS 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"
.
the method to be used in flagging mortalities. Options are "last", "any", "cumulative", or "all"
units of the duration of the residence events in data
.
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
. Note that if single detections are
removed (singles=FALSE
), backwards
will also not include single detections.
option to examine residence events prior to the one that was
flagged as a potential mortality. If prior residence events are at the same
station/location as the flagged event, the time of the potential mortality is shifted
earlier. Note that if backwards=TRUE
, then the output of method="last"
is
the same as method="any"
.
option to account for potential drifting in identifying thresholds and/or mortalities. Options are "none", "threshold", "morts", "both". Default is "none".
a dataframe of stations/locations where detected movement between stations may be due to drifting of an expelled tag or dead animal.
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
.
the maximum allowable time difference between detections to be
considered a single residence event. Recommended to be the same as used
to generate residence events in data
.
the units of the cutoff. Options are "secs", "mins", "hours",
"days", and "weeks". Recommended to be the same as used to generate
residence events in data
.
the start date/time(s) of the period of interest. If the period of interest is the same in all study years, must be a character string in format "dd-mm". Otherwise, must be in POSIXt, or a character string in format YYYY-mm-dd HH:MM:SS.
the end date/time(s) of the period of interest. If the period of interest is the same in all study years, must be a character string in format "dd-mm". Otherwise, must be in POSIXt, or a character string in format YYYY-mm-dd HH:MM:SS.
option to include residence events that overlap either the
beginning or the end of the period of interest. If TRUE
, the full overlapping
residence events will be retained. If FALSE
, only the portion of the
residence events that is within the period of interest will be retained,
and residences
will be recalculated, using specified units
.
Default is TRUE
a dataframe containing potential mortalities. The dataframe must
have the same columns and in the same order as data
.
option to display updates and progress bars as sub-functions are called and run. Default is TRUE.
a dataframe with start and end dates of the season(s) of interest
a dataframe with one row for each tag ID, including the date/time of the residence start when the potential mortality or expelled tag was identified. All input data fields (e.g., any name, location, or species information that was included with the input data) will be retained.
morts_ex<-morts(data=events,type="mort",ID="ID",
station="Station.Name",method="any",verbose=FALSE)
#>
|
| | 0%
|
|====== | 8%
|
|============ | 17%
|
|================== | 25%
|
|======================= | 33%
|
|============================= | 42%
|
|=================================== | 50%
|
|========================================= | 58%
|
|=============================================== | 67%
|
|==================================================== | 75%
|
|========================================================== | 83%
|
|================================================================ | 92%
|
|======================================================================| 100%
|
| | 0%
|
|====== | 8%
|
|============ | 17%
|
|================== | 25%
|
|======================= | 33%
|
|============================= | 42%
|
|=================================== | 50%
|
|========================================= | 58%
|
|=============================================== | 67%
|
|==================================================== | 75%
|
|========================================================== | 83%
|
|================================================================ | 92%
|
|======================================================================| 100%
head(morts_ex)
#> ResidenceStart Station.Name ID ResidenceEnd
#> 100 2005-07-02 17:02:03 5 D 2005-10-10 21:55:45
#> 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
#> 201 2006-02-04 21:25:18 17 G 2006-05-01 06:30:02
#> ResidenceLength.days
#> 100 100.20396
#> 101 89.02418
#> 106 102.96883
#> 201 85.37829
morts_ex_bw<-morts(data=events,type="mort",ID="ID",
station="Station.Name",method="any",backwards=TRUE,verbose=FALSE)
#>
|
| | 0%
|
|====== | 8%
|
|============ | 17%
|
|================== | 25%
|
|======================= | 33%
|
|============================= | 42%
|
|=================================== | 50%
|
|========================================= | 58%
|
|=============================================== | 67%
|
|==================================================== | 75%
|
|========================================================== | 83%
|
|================================================================ | 92%
|
|======================================================================| 100%
|
| | 0%
|
|====== | 8%
|
|============ | 17%
|
|================== | 25%
|
|======================= | 33%
|
|============================= | 42%
|
|=================================== | 50%
|
|========================================= | 58%
|
|=============================================== | 67%
|
|==================================================== | 75%
|
|========================================================== | 83%
|
|================================================================ | 92%
|
|======================================================================| 100%
head(morts_ex_bw)
#> ResidenceStart Station.Name ID ResidenceEnd
#> 100 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
#> 201 2004-06-28 12:30:56 17 G 2004-06-30 09:59:17
#> ResidenceLength.days
#> 100 0.03493056
#> 101 89.02417824
#> 106 102.96883102
#> 201 1.89468750