lunar.phase {lunar}R Documentation

Lunar Phase

Description

Returns the lunar phase on specified dates.

Usage

lunar.phase(x, shift = 0, ..., name = FALSE)

Arguments

x

A vector of Date values.

shift

The number of hours by which to shift the calculation of lunar phase. By default lunar phase is calculated at 12 noon UT.

...

Other optional arguments are ignored.

name

Optional parameter indicating whether the return is a factor variable By default lunar phase is returned in radians. If assigned the value 8, it returns a factor variable with 8 phase levels. If TRUE or any value other than 0 or 8, it returns a factor variable with 4 phase labels.

Details

Adapted from function moon.illumination in from the R4MFCL project (not an R package), which was developed by the Secretariat of the Pacific Community (SPC). The R4MFCL project was led by Simon Hoyle, and also includes code by Shelton Harley, Nick Davies, and Adam Langley of the SPC, and Pierre Kleiber of the US National Marine Fisheries Service. Pierre Kleiber is the author of the moon.illumination function.

Code from project R4MFCL is distributed under the MIT License:

https://opensource.org/licenses/mit-license.php

Here is a link to the R4MFCL project:

https://code.google.com/archive/p/r4mfcl/

The R4MFCL code was modified as follows:

Where radians are returned:

Adapted originally from Stephen R. Schmitt: Sky & Telescope, Astronomical Computing, April 1994 and https://web.archive.org/web/20140716104947/http://mysite.verizon.net/res148h4j/zenosamples/zs_lunarphasecalc.html, which references Jean Meeus, Astronomical Algorithms. Willmann-Bell, Inc. (1991) 429p.

See Also

lunar.4phases

lunar.8phases

Examples

lunar.phase(as.Date("2013-05-06"))

[Package lunar version 0.2-1 Index]