daynight_table {ggdaynight} | R Documentation |
Generates a data frame representing daytime and nighttime periods based on a sequence of datetime values.
daynight_table(min_datetime, max_datetime, sunrise, sunset)
min_datetime |
The starting datetime value (POSIXct format). |
max_datetime |
The ending datetime value (POSIXct format). |
sunrise |
The hour at which daytime starts. |
sunset |
The hour at which nighttime starts. |
A data frame with columns datetime
and daytime
,
where datetime
represents the datetime values and daytime
is a logical indicating whether the time is during the day.