aweek (version 1.0.1)

factor_aweek: Coerce an aweek object to factor to include missing weeks

Description

Coerce an aweek object to factor to include missing weeks

Usage

factor_aweek(x)

Arguments

x

an aweek object

Value

an aweek object that inherits from factor() with levels that span the range of the weeks in the object.

Examples

Run this code
# NOT RUN {
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