intervalData: Extract auxiliary tag data

Description Usage Arguments Details Value

View source: R/BAStag.R

Description

Summarise auxiliary data in specified intervals

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
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.


SWotherspoon/BAStag documentation built on March 29, 2021, 2:47 a.m.