get_sun: Retrieve sunrise or sunset times by geographic location

Description Usage Arguments Examples

Description

Very thin wrapper around sunriset mainly for the output formatting

Usage

1
2
get_sun(lon, lat, start = Sys.Date(), end = start,
  direction = c("sunrise", "sunset", "dawn", "dusk"), out_tz = "GMT")

Arguments

lon

numeric scalar of position longitude (decimal degrees; WGS84)

lat

numeric scalar of position latitude (decimal degrees; WGS84)

start

character or Date scalar of start date ("YYYY-MM-DD")

end

character or Date scalar of start date ("YYYY-MM-DD")

direction

any combination of "dawn", "dusk", "sunrise", or "sunset", indicating which ephemerides should be calculated. Here, dawn and dusk represent civil sunrise and civil sunset (sun 6 degrees below horizon), respectively.

out_tz

time zone specification to be used for output. System-specific (see timezones. Default is "GMT" (UTC; Universal Time, Coordinated).

Examples

1
2
3
get_sun(-83, 34)
get_sun(-83, 34, start = "2017-12-31", end = "2017-12-31",
        direction = c("sunrise", "sunset"), out_tz = "America/New_York")

adamdsmith/nrsmisc documentation built on Aug. 13, 2019, 2:14 p.m.