Find the day of a week

前端 未结 7 1911
长情又很酷
长情又很酷 2020-11-22 17:37

Let\'s say that I have a date in R and it\'s formatted as follows.

   date      
2012-02-01 
2012-02-01
2012-02-02

Is there any way in R to

7条回答
  •  半阙折子戏
    2020-11-22 17:52

    form comment of JStrahl format(as.Date(df$date),"%w"), we get number of current day : as.numeric(format(as.Date("2016-05-09"),"%w"))

提交回复
热议问题