Last chance! 50% off unlimited learning
Sale ends in
sun_angles
, given geographical coordinates and dates. They can be also
used to find the time for an arbitrary solar elevation between 90 and -90
degrees by supplying "twilight" angle(s) as argument.
day_night(date = lubridate::today(), tz = "UTC", geocode = NULL, lon = 0, lat = 0, twilight = "none", unit.out = "date")
noon_time(date = lubridate::today(), tz = "UTC", geocode = NULL, lon = 0, lat = 0, twilight = NA, unit.out = "date")
sunrise_time(date = lubridate::today(), tz = "UTC", geocode = NULL, lon = 0, lat = 0, twilight = "none", unit.out = "date")
sunset_time(date = lubridate::today(), tz = "UTC", geocode = NULL, lon = 0, lat = 0, twilight = "none", unit.out = "date")
day_length(date = lubridate::today(), tz = "UTC", geocode = NULL, lon = 0, lat = 0, twilight = "none", unit.out = "hour")
night_length(date = lubridate::today(), tz = "UTC", geocode = NULL, lon = 0, lat = 0, twilight = "none", unit.out = "hour")
numeric
vector of length one, or two, giving
solar elevation angle(s) in degrees (negative if below the horizon).day_night
returns a list with fields sunrise time, sunset
time, day length, night length. Each element of the list is a vector of the
same length as the argument supplied for date.noon_time
, sunrise_time
and sunset_time
return a
vector of POSIXct timesday_length
and night_length
return numeric a vector
giving the length in hours
sun_angles
library(lubridate)
day_length()
day_length(ymd("2015-05-30"), lat = 60, lon = 25)
day_length(ymd("2014-12-30"), lat = 60, lon = 25)
day_length(ymd("2015-05-30"), lat = 60, lon = 25, twilight = "civil")
sunrise_time(ymd("2015-05-30"), lat = 60, lon = 25, tz = "EET")
day_night(ymd("2015-05-30"), lat = 60, lon = 25, twilight = "civil")
Run the code above in your browser using DataLab