How to get a date from day of year

后端 未结 1 898
闹比i
闹比i 2021-01-03 02:49

I am working with a data set that looks a bit like this:

    Year Date       Day_nr Value
    1976 19-02-1976 50     167
    1976 19-03-1976 79     140
    1         


        
1条回答
  •  囚心锁ツ
    2021-01-03 03:19

    Google appears to have an answer: https://stat.ethz.ch/pipermail/r-help/2012-March/308013.html

    Using first line from second set above as an example:

    > strptime(paste("1976", 53), format="%Y %j")
    [1] "1976-02-22"
    

    0 讨论(0)
提交回复
热议问题