Find the day of a week

前端 未结 7 1873
长情又很酷
长情又很酷 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:51

    Look up ?strftime:

    %A Full weekday name in the current locale

    df$day = strftime(df$date,'%A')
    

提交回复
热议问题