TMS TMS - 1 year ago 93
R Question

Convert day of year to date

How do I convert day-of-year to date?

I.e. the opposite to: How do you convert POSIX date to day of year in R?

Answer Source

This is the way I do it:

as.Date(104, format = "%j", origin = "1.1.2014")
# "2014-04-15"

PS: for those who wonder if answering my own question is encouraged, please look here:

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download