convert | R Documentation |
Interconverts dates in a variety of calendars.
convert(from, to, ...)
## S4 method for signature 'character,character'
convert(from, to)
## S4 method for signature 'TimeScale,TimeScale'
convert(from, to)
from |
A |
to |
A |
... |
Currently not used. |
A function
that when called with a single numeric argument (factional
years) converts years from one calendar to another.
N. Frerebeau
Other calendar tools:
calendar()
,
calendar_get
,
gregorian
,
is()
,
julian()
## Define time scales
BP <- calendar("BP")
AD <- calendar("AD")
## Make conversion functions
BP_to_AD <- convert(BP, AD)
AD_to_BP <- convert(AD, BP)
## Convert years
BP_to_AD(0)
AD_to_BP(1950)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.