View source: R/sidfex.reltime2ydoy.R
sidfex.reltime2ydoy | R Documentation |
Convert days since a reference time to Year and DayOfYear based on the Gregorian calendar
sidfex.reltime2ydoy(reltime, RefYear = 2017, RefDayOfYear = 1.0)
reltime |
a numeric vector specifying the time in days relative to the reference time provided by |
RefYear |
an integer scalar specifying the reference year. Can also be character which will be coerced with |
RefDayOfYear |
a numeric scalar specifying the reference day of year. Can also be character which will be coerced with |
a numeric vector of the same length as DayOfYear
.
Year |
an integer vector providing the year. |
DayOfYear |
a numeric vector providing the day of the year. |
The convention for the day of the year is that January 1st begins with DayOfYear=1.0
, that is, DayOfYear=1.5
corresponds to January 1st 12:00.
Helge Goessling
reltime = seq(-100,400,pi*10)
ydoy = sidfex.reltime2ydoy(reltime=reltime,RefYear=2016,RefDayOfYear=1)
print(ydoy)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.