0

How to convert this date format 2017-11-01 into name of day of the week i.e.Wednesday, using R?

j.due
  • 47
  • 1
  • 1
  • 6

1 Answers1

4
> format(as.Date('2017-11-01'), '%A')
[1] "Wednesday"
Mouad_Seridi
  • 2,666
  • 15
  • 27
  • how do it my dataset? dataset$month format(as.Date('dataset$month'), '%A') right? – j.due Nov 01 '17 at 15:02
  • 1
    you have to specify the format of your column, if it's `Date` then you just do `my_data$my_new_column <- format(my_data$my_column, '%A')` – Mouad_Seridi Nov 01 '17 at 15:03