Convert a period (from reshape_msd()) in the format of FY22Q1 or FY22 (for targets/cumulative).

convert_qtr_to_date(period, type = "start")

Arguments

period

period formated like FY22Q1 or FY22

type

start or end date of quarter/period, default = "start"

Value

date vector

Examples

if (FALSE) { # \dontrun{
df <- read_msd(path)
df <- df %>%
  filter(df,
         operatingunit == "Jupiter",
         indicator == "TX_NEW",
         standarddisaggregate == "Total Numerator") %>%
  group_by(fiscal_year, primepartner) %>%
  summarize(across(start_with("qtr"), sum, na.rm = TRUE)) %>%
  ungroup()
df <- df %>%
  reshape_msd() %>%
  mutate(date = convert_qtr_to_date(period), .after = period) } # }