Convert day of year (doy) to date in month and day format

doy2date(doy, format = "%d-%b")

Arguments

doy

a vertor of day of year

format

the date format

Value

Date in month and day format in character format

Details

No leap year is considered

Examples

doy2date(seq(1, 10))
#>  [1] "01-Jan" "02-Jan" "03-Jan" "04-Jan" "05-Jan" "06-Jan" "07-Jan" "08-Jan"
#>  [9] "09-Jan" "10-Jan"