doy2date: Converts from doy to date
Description
Given a day of the year as julian (1-366) it converts to ‘Date’
Given a ‘Date’ it converts to julian day (1-366) or day of the year
Usage
doy2date(x, year = 2001, inverse = FALSE)date2doy(x, year = 2001, inverse = FALSE)
Arguments
x
either an integer 1-366 or a ‘Date’
inverse
if TRUE it goes from doy to ‘Date’
Value
an object of class ‘Date’ or a numeric if inverse equals TRUE.
an numeric or an object of class ‘Date’ if inverse equals TRUE.
Examples
Run this code# NOT RUN {
doy2date(120)
date2doy("04-30")
# }
Run the code above in your browser using DataLab