daynight_table: Create Day/Night Pattern Data

View source: R/geom_daynight.R

daynight_tableR Documentation

Create Day/Night Pattern Data

Description

Generates a data frame representing daytime and nighttime periods based on a sequence of datetime values.

Usage

daynight_table(min_datetime, max_datetime, sunrise, sunset)

Arguments

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.

Value

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.


ggdaynight documentation built on May 29, 2024, 9:34 a.m.