knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "README-"
)

twilight

Project Status: Active - The project has reached a stable, usable state and is being actively developed. CRAN_Status_Badge CRAN RStudio mirror downloads AppVeyor Build Status Travis-CI Build Status

The goal of twilight is to provide an R wrapper for the sun/moon rise/set data at http://aa.usno.navy.mil/data/docs/RS_OneYear.php

Installation

# install.packages("devtools")
devtools::install_github("jsta/twilight")

Usage

Load package

library(twilight)

Geographic Coordinates

Raw Sunrise/set

head(
  sunsetrise_yr(year = 2015,
              lon_deg = 80,
              lon_min = 26,
              lat_deg = 25,
              lat_min = 5,
              tz = 5)
)

Day Length

head(
  tw_daylength(year = 2015,
              lon_deg = 80,
              lon_min = 26,
              lat_deg = 25,
              lat_min = 5,
              tz = 5)
)

United State Place Names

Raw Sunrise/set

head(
  sunsetrise_yr(year = 2015,
                state = "FL",
                city = "Key Largo")
)

Day Length

head(
  tw_daylength(year = 2015,
                state = "FL",
                city = "Key Largo")
)

Contributors

Contributions welcome in the form of pull requests and issues!



jsta/twilight documentation built on May 20, 2019, 2:11 a.m.