Using the results from getRecursions or getRecursionsAtLocations, calculates the residence time during user-specified intervals (rather than the entire trajectory period) in the radius around each location.

calculateIntervalResidenceTime(x, breaks, labels = NULL)

Arguments

x

recurse object returned from call to getRecursions or getRecursionsAtLocations with verbose = TRUE

breaks

vector of POSIX datetimes describing the interval boundaries

labels

(optional) vector or names for the intervals

Value

A matrix of residence times where the columns are the coordinate indices of the locations (either movement trajectory locations or user-specified locations) and the rows are the time intervals.

Details

When recursions are calculated, the residence time in the radius around each location is also calculated. This method allows the user to post-process the results from calculating recursions to calculate residence time over user-specified intervals, rather than the entire trajectory. This allows the calculation of residence time on biologically relevant scales, such as seasons, and in cases where large gaps between visits (e.g., a seasonal migrant) may make splitting up the residence time preferable.

Note that care should be taken to use the same time zone when specifying the break points as used in the datetime for the movement trajectory.

See also

getRecursions, getRecursionsAtLocations

Examples

data(martin) revisits = getRecursions(martin, radius = 1) breaks = strptime(c("2000-01-01 00:00:00", "2000-01-15 00:00:00", "2000-02-01 00:00:00"), format = "") intervalResTime = calculateIntervalResidenceTime(revisits, breaks)