79773545

Date: 2025-09-24 09:54:23
Score: 1
Natty:
Report link

The reason to get back 1 for certain years is that if there are only 52 weeks in a year, then "dec-28" may counted to the first week of the next year. It is easy to get rid of that problem:

weeks <- function(year) {
  
 y<- lubridate::isoweek(paste0(year, "-12-31"))
y[y==1] <- 52
return(y
  
}
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: GY S