fixed_gregorian {aion} | R Documentation |
Rata Die Conversion to and from Gregorian Years
Description
Convenient functions for conversion from and to rata die for a given Gregorian era.
Usage
fixed_from_BP(year, month, day)
fixed_to_BP(object)
fixed_from_BC(year, month, day)
fixed_to_BC(object)
fixed_from_BCE(year, month, day)
fixed_to_BCE(object)
fixed_from_AD(year, month, day)
fixed_to_AD(object)
fixed_from_CE(year, month, day)
fixed_to_CE(object)
fixed_from_b2k(year, month, day)
fixed_to_b2k(object)
Arguments
year |
A |
month |
A |
day |
A |
object |
Details
The astronomical notation is used for Gregorian years (there is a year 0).
Value
-
fixed_from_*()
returns aRataDie
object. -
fixed_to_*()
returns anumeric
vector of Gregorian years.
Author(s)
N. Frerebeau
References
Reingold, E. M. and Dershowitz, N. (2018). Calendrical Calculations: The Ultimate Edition. Cambridge University Press. doi:10.1017/9781107415058.
See Also
Other fixed date tools:
arithmetic
,
as_date()
,
as_decimal()
,
as_fixed()
,
as_year()
,
fixed()
,
fixed_julian
,
format()
,
pretty()
Examples
## R 1.0.0
(y <- fixed(year = 2000, month = 02, day = 29, calendar = CE()))
as_date(y, calendar = CE())
as_year(y, calendar = CE())
## Create a vector of years BP (Gregorian)
## (every two years starting from 2000 BP)
(years <- seq(from = 2000, by = -2, length.out = 10))
## Convert years to rata die
(rd <- fixed(years, calendar = BP()))
## Convert back to Gregorian years BP
as_year(rd, calendar = BP())
## More convenient
(rd <- fixed_from_BP(years))
fixed_to_BP(rd)
[Package aion version 1.0.4 Index]