powered by
Coerce an aweek object to factor to include missing weeks
factor_aweek(x)
an aweek object that inherits from factor() with levels that span the range of the weeks in the object.
factor()
an aweek object
w <- get_aweek(week = (1:2) * 5, year = 2019, day = c(7, 1)) w wf <- factor_aweek(w) wf # factors are destroyed if combined with aweek objects c(w, wf)
Run the code above in your browser using DataLab