drift {mort} | R Documentation |
Dead and drifting
Description
Identifies sequential residence events where detected movement between stations may be due to drifting of an expelled tag or dead animal.
Usage
drift(
data,
type,
ID,
station,
res.start = "auto",
res.end = "auto",
residences = "auto",
units = "auto",
ddd,
from.station,
to.station,
cutoff = NULL,
cutoff.units = NULL,
verbose = TRUE
)
Arguments
data |
a data frame of residence events. Residence events must include tag ID, location name, start time, and end time. |
type |
the method used to generate the residence events in |
ID |
a string of the name of the column in |
station |
a string of the name of the column in |
res.start |
a string of the name of the column in |
res.end |
a string of the name of the column in |
residences |
a character string with the name of the column in |
units |
units of the duration of the residence events in |
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 |
to.station |
a string of the name of the column in |
cutoff |
the maximum allowable time difference between detections to be
considered a single residence event. Default is |
cutoff.units |
the units of the cutoff. Options are "secs", "mins", "hours", "days", and "weeks". |
verbose |
option to display progress bar as |
Value
A data frame with one row for each residence event. Format is the same as the input residence events, but events that may be due to dead drift are combined into single residence events.
Examples
# With no drift:
head(events)
drift.events<-drift(data=events[events$ID=="A",],type="mort",ID="ID",
station="Station.Name",ddd=ddd,from.station="From",to.station="To",
verbose=FALSE)
head(drift.events)
# With cutoff:
drift.events<-drift(data=events[events$ID=="A",],type="mort",ID="ID",
station="Station.Name",ddd=ddd,from.station="From",to.station="To",
cutoff=1,cutoff.units="days",verbose=FALSE)
head(drift.events)