1

I have a list of 3680 dates (YYYY-MM-DD) and I need to create a function that gives me the week number for each date. However, my week starts on wednesday and not sunday, as it's set by default on R.

Any idea on how to do that? I tried with lubridate and with as.week, but couldnt get there with none of these functions.

Any idea?

Thanks in advance!!

Neoromanzer
  • 434
  • 2
  • 15
Ana
  • 33
  • 4
  • look at https://stackoverflow.com/questions/22439540/how-to-get-week-numbers-from-dates – sweetmusicality Nov 10 '17 at 09:45
  • thanks, but I tried this : https://stackoverflow.com/a/43866536/8918706 but it always returns 0.. – Ana Nov 10 '17 at 10:00
  • 1
    It looks like it's `lubridate` option `getOption("lubridate.week.start", 3)`: http://lubridate.tidyverse.org/reference/day.html – Phil Nov 10 '17 at 10:32

0 Answers0