findTwilights | R Documentation |
Search for pairs of twilights spanning night.
findTwilights(tagdata, threshold, include, exclude = NULL, extend = 0,
dark.min = 0)
tagdata |
a dataframe with columns |
threshold |
the light threshold that defines twilight. |
include |
a vector of times as POSIXct. Nights that span these times are included in the search. |
exclude |
a vector of POSIXct times. Nights that span these times are excluded from the search. |
extend |
a time in minutes. The function seeks periods of darkness that differ from one another by 24 hours plus or minus this interval. |
dark.min |
a time in minutes. Periods of darkness shorter than this interval will be excluded. |
Search for sunset, sunrise pairs that correspond to a given light threshold.
Given a set of times (include
) known to fall in the night,
findTwilights
determines the twilights that span these times, and
computes the corresponding midnights. It then searches for periods
of darkness that lie approximately 24 hours from these midnights,
repeating the process until no new twilight pairs are found.
If interleave=TRUE
, the sunrise and sunset times are
interleaved andreturned as a single sequence of twilights,
otherwise sunset and sunrise times are returned separately. The
function interleave.twilights
takes a dataframe of separate
sunset and sunrise times and interleaves them to form a sequence
of twilight times.
A dataframe with columns
Twilight |
times of twilight |
Rise |
logical indicating sunrise |
where each row corresponds to a single twilight.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.