Convert week number to date

后端 未结 4 602
离开以前
离开以前 2020-11-28 11:30

I have a data frame in R with the week of the year that I would like to convert to a date. I know I have to pick a year and a day of the week so I am fixing those values at

4条回答
  •  情深已故
    2020-11-28 11:54

    Another option with lubridate

    lubridate::parse_date_time(paste(2014, df$Week, 'Mon', sep="/"),'Y/W/a')
    

提交回复
热议问题