From my inputs, which is numeric format and represent the year and the week number, I need to create a sequence, from one input to the other.
Inputs example :
input.from <- 202144
input.to <- 202208
Desired output would be :
c(202144:202152, 202201:202208)
According to me, it is a little more complex, because of these constraints :
- Years with 53 weeks : I tried
lubridate::isoweek()
, the%W
or%v
format, ... - Always keep two digits for the week : I tried
"%02d"
, ...
I also tried to convert my input to date, ... Anyway, many attemps without success to create my function.
Thanks for your help !