Learn R Programming

rsMove (version 0.2.4)

hotMoveStats: hotMoveStats

Description

Segmentation and statistical analysis of the time spent by an animal within a geographical region.

Usage

hotMoveStats(region.id, obs.time, individual.id = NULL)

Arguments

region.id

Region unique identifiers. Vector of class numeric.

obs.time

Observation time. Object of class Date.

individual.id

Individual identifier. Vector of class character.

Value

A list containing statistical information for each region (region.stats) and for each temporal segment (temporal.segment.stats) and sample indices for each segment (temporal.segment.indices)

Details

For each unique region defined by region.id, the function identifies unique temporal segments defined as periods of consecutive days with observations. Then, for each region, the function uses the identified segments to report on the minimum, maximum and mean time spent as well as the total amount of time spent within the region. Moreover, the function provides a detailed report of each segment and informs on the corresponding sample indices. If individual.id is specified, the function will in addition count the number of individuals found within each region and within each temporal segment.

See Also

hotMove

Examples

Run this code
# NOT RUN {
{

require(raster)

# reference data
data(longMove)

# extract regions
hm <- hotMove(longMove, 0.1, return.shp=TRUE)

# plot shapefile (color by region)
plot(hm$polygons)

# add new information to original shapefile
longMove@data <- cbind(longMove@data, hm$indices)

# derive statistics
hm.region.stats <- hotMoveStats(hm$indices, as.Date(longMove@data$timestamp))

}
# }

Run the code above in your browser using DataLab