Get the a vector of periods follow DHIS formatting that spans that start and end period provided

get_period_range(frequency, year_start, sub_year_start, year_end, sub_year_end)

Arguments

frequency

Text of either weekly or monthly

year_start

Integer for start year

sub_year_start

Integer for either week or month of the year to start

year_end

Integer for end year

sub_year_end

Integer for either week or month of the year to end

Value

A vector of periods following the DHIS formatting standard of either YYYYW{week number with no leading zero} or YYYY{month number with a leading zero for single digit integers}