Uses new data to determine if an animal that was previously flagged as a mortality made a station/location change and may therefore be alive.

review(
  morts,
  new.data,
  old.data = NULL,
  type,
  ID,
  station,
  res.start = "auto",
  res.end = NULL,
  residences = NULL,
  units = NULL,
  ddd = NULL,
  from.station = NULL,
  to.station = NULL,
  verbose = TRUE
)

Arguments

morts

a dataframe with previously flagged mortalities. Format does not need to match new.data exactly, but the names and formats of ID, station, and res.start fields must match in all input dataframes.

new.data

a dataframe of new residence events (i.e., generated from detection data that were not included in earlier mort analyses).

old.data

optional dataframe of residence events that were used in earlier mort analyses. If drift was applied in earlier analyses, including old.data is recommended to avoid falsely identifying station changes.

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, res.end, residences, and units.

ID

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

station

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

res.start

a string of the name of the column in morts and new.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.

res.end

an optional string of the name of the column in morts and new data that holds the end date and time. Only needed if drift is applied.

residences

an optional character string with the name of the column in morts and new.data that holds the duration of the residence events. Only needed if drift is applied.

units

optional units of the duration of the residence events in morts and new.data. Only needed if drift is applied.

ddd

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

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 morts and new.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 morts and new.data.

verbose

option to display progress bar as function and called functions are run. Default is TRUE.

Value

A dataframe with one row for each tag ID from morts with a station/location change that was identified in new.data. The remaining fields will include the information for the residence event that was identified as the station change, so the station change can be verified by the user before removing the animal from morts. All input data fields (e.g., any name, location, or species information that was included with the input data) will be retained.

Examples

morts<-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%

undead<-review(morts=morts,new.data=new.data,
type="mort",ID="ID",station="Station.Name",verbose=FALSE)