suntimes | R Documentation |
suntimes
is used to calculate, sunrise, sunset and daylength on any given data at a specified location.
suntimes(julian, lat, long, merid = round(long/15, 0) * 15, dst = 0)
julian |
the Julian day as returned by |
lat |
latitude of the location for which |
long |
longitude of the location for which |
merid |
an optional numeric value representing the longitude (decimal degrees) of the local time zone meridian (0 for GMT). Default is |
dst |
an optional numeric value representing the time difference from the timezone meridian (hours, e.g. +1 for BST if |
if the sun is above or below the horizon for 24 hours on any days, a warning is given, and the sunrise and sunset returned are the appoximate times at which that the sun is closest to the horizon.
a data.frame with three components:
sunrise
a vector of sunrise (hours in 24 hour clock).
sunrise
a vector of sunset (hours in 24 hour clock).
sunrise
a vector of daylengths (hours).
jd <- julday(2018, 1, 16)
suntimes(jd, 50.17, -5.12) # Cornwall, UK
suntimes(jd, 78.22, 15.64) # Longyearbyen, Svalbad
suntimes(jd, -54.94, -67.61, merid = -60, dst = 1) # Puerto Williams, Cabo de Hornos, Chile
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.