Package Lunar': R Topics Documented
Package Lunar': R Topics Documented
Package Lunar': R Topics Documented
R topics documented:
lunar-package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
lunar.4phases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
lunar.8phases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
lunar.distance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
lunar.distance.mean . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
lunar.distances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
lunar.illumination . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
lunar.illumination.mean . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
lunar.metric.mean . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
lunar.phase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
terrestrial.season . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
terrestrial.seasons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
1
2 lunar.4phases
Index 12
Description
Lunar Phase & Distance, Seasons and Other Environmental Factors.
Provides functions to calculate the phase of the moon, its distance from the earth, the season and
possibly other environmental factors, based on date and location.
Details
Package: lunar
Type: Package
Version: 0.1-04
Date: 2014-09-04
Depends: R (>= 2.10.0)
Encoding: UTF-8
License: MIT
LazyLoad: no
URL: http://statistics.lazaridis.eu
Author(s)
Emmanuel Lazaridis
Description
Return 4 category labels for lunar phases.
Usage
lunar.4phases
lunar.8phases 3
Format
chr [1:4] "New" "Waxing" "Full" "Waning"
Details
These are category names corresponding to phases of the moon. Moon phase category names may
be returned in the output of the lunar.phase function if its name option is set to TRUE.
See Also
lunar.phase
Examples
print(lunar.4phases)
Description
Return 8 category labels for lunar phases.
Usage
lunar.8phases
Format
chr [1:8] "New" "Waxing crescent" "First quarter" "Waxing gibbous" "Full" "Waning gibbous" ...
Details
These are category names corresponding to phases of the moon. Moon phase category names may
be returned in the output of the lunar.phase function if its name option is set to TRUE.
See Also
lunar.phase
Examples
print(lunar.8phases)
4 lunar.distance
Description
Returns the distance of the moon from the earth on specified dates.
Usage
Arguments
Details
Distance to the moon is returned in units of earth radii, or as a 5-level factor variable referring to
the moon’s perigee (at about 56 earth radii) and apogee (at about 63.8 earth radii).
Adapted from Stephen R. Schmitt: Lunar Phase Computation: http://mysite.verizon.net/
res148h4j/zenosamples/zs_lunarphasecalc.html. Last accessed: 1 September 2014.
See Also
lunar.distances
Examples
lunar.distance(as.Date("2004-03-24"))
lunar.distance.mean 5
Description
Returns the average lunar distance around specified dates.
Usage
lunar.distance.mean(x, towards = -6, ..., by = c("date", "hours", "day",
"night"))
Arguments
x A vector of Date values.
towards The directed window size from x in days. By default the window looks back 7
days including x.
by The exposure interval and integration basis. The default is to represent a day’s
distance by the distance at 12 noon UT. The other options integrate midrange
distances over hours.
... Other optional arguments are ignored.
See Also
lunar.distance
Examples
lunar.distance.mean(as.Date("2004-03-24"))
Description
Return category labels for lunar distances.
Usage
lunar.distances
Format
chr [1:5] "Apogee" "Far" "Average" "Near" "Perigee"
6 lunar.illumination
Details
These are category names corresponding to distances from the center of the Earth to the center of
its moon. Distance category names are used in the output of the lunar.distance function if its
name option is set to TRUE.
The perigee occurs at roughly 56 Earth radii, and the apogee at about 62.8 Earth radii. These
categories are not determined according to any common standard. They may have different precise
definitions for their bounds in different analyses.
See Also
lunar.distance
Examples
print(lunar.distances)
Description
Returns the proportion of lunar illumination on specified dates.
Usage
lunar.illumination(x, shift = 0)
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.
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:
http://opensource.org/licenses/mit-license.php
Here is a link to the R4MFCL project:
https://code.google.com/p/r4mfcl/
lunar.illumination.mean 7
See Also
lunar.illumination.mean
Examples
lunar.illumination(as.Date("2004-03-24"))
lunar.illumination.mean
Average Lunar Illumination
Description
Usage
Arguments
See Also
lunar.illumination
Examples
lunar.illumination.mean(as.Date("2004-03-24"))
8 lunar.metric.mean
Description
Returns an average measurement around specified dates.
Usage
lunar.metric.mean(x, towards = -6, ..., by = c("date", "hours", "day",
"night"), type = c("illumination", "distance"))
Arguments
x A vector of Date values.
towards The directed window size from x in days. By default the window looks back 7
days including x.
by The exposure interval and integration basis. The default is to represent a day’s
illumination by the illumination at 12 noon UT. The other options integrate
midrange illuminations over hours. Options ’day’ and ’night’ are not currently
implemented, but will be used to limit exposure intervals. The use of an unim-
plemented option in a function call will result in a NULL value being returned.
type Whether illumination or distance metrics are to be returned. The use of an unim-
plemented option in a function call will result in a NULL value being returned.
... Other optional arguments are ignored.
Details
This in an internal support function that integrates a lunar measurement over time using step sizes
of days or hours.
See Also
lunar.illumination
lunar.distance
Examples
## Not run:
lunar.metric.mean(as.Date("2004-03-24"), type="illumination")
## End(Not run)
lunar.phase 9
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.
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.
... Other optional arguments are ignored.
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:
http://opensource.org/licenses/mit-license.php
Here is a link to the R4MFCL project:
https://code.google.com/p/r4mfcl/
The R4MFCL code was modified as follows:
Adapted originally from Stephen R. Schmitt: Sky & Telescope, Astronomical Computing, April
1994 and 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"))
Description
Returns the season on specified dates.
Usage
terrestrial.season(x)
Arguments
x A vector of Date values.
Details
The definitions for non-leap years are as follows (dates are inclusive):
See Also
terrestrial.seasons
Examples
terrestrial.season(as.Date("2004-03-24"))
Description
Return category labels for the seasons on Earth.
Usage
terrestrial.seasons
Format
chr [1:4] "Winter" "Spring" "Summer" "Autumn"
Details
These are category names corresponding to the seasons of the planet Earth.
Examples
print(terrestrial.seasons)
Index
12