day_overlap | R Documentation |
Estimate the number of the day covered by timestamps.
day_overlap(x)
x |
Observation time. Object of class POSIXct, POSIXlt, or POSIXt. |
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.
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.
{
# 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)])
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.