day_overlap: day_overlap

View source: R/day_overlap.R

day_overlapR Documentation

day_overlap

Description

Estimate the number of the day covered by timestamps.

Usage

day_overlap(x)

Arguments

x

Observation time. Object of class POSIXct, POSIXlt, or POSIXt.

Details

The function estimates how much of a day is covered by the timestamps in x, which correspond to the timestamps in a movement dataset. Note that x is not accepted if containing data from more than one day.

Value

A list containing:

  • day.cover - Percent of the day with recorded timestamps.

  • day.overlap - Percent of the day covered between the first and last timestamp.

Examples

{

# load samples
multiMove <- read.csv(system.file('extdata', 'multiMove.csv', package="rsMove"))

# data-time of species observations
times = strptime(multiMove$timestamp,format="%Y-%m-%d %H:%M:%S")

# subset to first unique day
days = as.Date(times)
times = times[which(days == unique(days)[1])]

# extract regions
day_overlap(date)])

}

RRemelgado/rsMove documentation built on June 3, 2024, 10:07 p.m.