cut_daylight | R Documentation |
Cut a POSIXct Vector into daylight (day, night)
cut_daylight(x, coords = c(lat = 47.36667, lon = 8.55))
x |
a POSIXct Vector with a timezone |
coords |
a named vector of the location in WGS84 coordinates for the daylight factoring.
|
factor vector with levels day, night
fn <- rOstluft.data::f("Zch_Stampfenbachstrasse_h1_2013_Jan.csv")
data <- rOstluft::read_airmo_csv(fn)
data <- dplyr::mutate(data,
daylight_zuerich = cut_daylight(.data$starttime),
daylight_sidney = cut_daylight(.data$starttime, c(lat = -33.9, lon = 151.2))
)
tibble::glimpse(data)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.