residences {mort}R Documentation

Generate residence events

Description

Generate residence events from passive acoustic telemetry data.

Usage

residences(data, ID, station, datetime, cutoff, units, verbose = TRUE)

Arguments

data

a data frame of detection data.

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.

datetime

a string of the name of the column in data that holds the date and time.

cutoff

the maximum allowable time difference between detections to be considered a single residence event.

units

the units of the cutoff. These will also be the units used to calculate the duration of the residence events. Options are "secs", "mins", "hours", "days", and "weeks".

verbose

option to display progress bar as residences are generated. Default is TRUE.

Details

Note that a progress bar appears, based on how many of the unique tag IDs have been processed. There will be a delay both before the progress bar appears and after the progress bar has reached 100%, which may be substantial depending on the size of the telemetry dataset.

Value

A data frame with one row for each residence event, including date/time of residence start, date/time of residence end, and duration of residence event. All input data fields (e.g., any name, location, or species information that was included with detection data) will be retained.

Examples

head(detections)
res.events<-residences(data=detections[1:500,],ID="ID",station="Station.Name",
datetime="DateTimeUTC",cutoff=1,units="days",verbose=FALSE)
head(res.events)

[Package mort version 0.0.1 Index]