intervalData: Extract auxiliary tag data

View source: R/TwGeos.R

intervalDataR Documentation

Extract auxiliary tag data

Description

Summarise auxiliary data in specified intervals

Usage

intervalData(date, y, start, end, FUN = function(y) if (all(is.na(y))) NA else
  mean(y, na.rm = TRUE))

twilightData(date, y, twl, before = 4, after = 4, FUN = function(y) if
  (all(is.na(y))) NA else mean(y, na.rm = TRUE))

Arguments

date

the sequence of sample times as POSIXct.

y

the sequence of responses.

start

the start of the time interval to summarize.

end

the end of the time interval to summarize.

FUN

summary function

twl

the sequence of estimated twilight times as POSIXct.

before

the interval (hours) before twilight to include in the interval.

after

the interval (hours) after twilight to include in the interval.

Details

Given a time series of responses and a sequence of start and end times defining time intervals spanned by the time series, intervalData computes a summary statistic for each interval. The twilightData is similar, but the time intervals are defined as a number of hours before and after a given sequence of twilight times.

Value

the data summary for each twilight.


slisovski/TwGeos documentation built on Jan. 27, 2024, 10:43 a.m.