Closed
Description
There is a bug in the week() function which leads to the first week of the year being only 6 days long. For example, if you type
x <- seq(from = ymd("2014-01-01"), to = ymd("2014-01-10"), by = "days")
week(x)
then you'll get 1 1 1 1 1 1 2 2 2 2
. The code should be changed from it's current state, which is this:
function(x)
yday(x) %/% 7 + 1
to this:
function(x)
(yday(x) - 1) %/% 7 + 1
Metadata
Metadata
Assignees
Labels
No labels