convert_qtr_to_date: Convert FY Quarter/Period to Date

View source: R/covert_date_period.R

convert_qtr_to_dateR Documentation

Convert FY Quarter/Period to Date

Description

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

Usage

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

See Also

Other period: convert_date_to_qtr(), convert_datim_pd_to_qtr(), convert_fy_qtr_to_pd()

Examples

## Not run: 
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) 
## End(Not run)


USAID-OHA-SI/glamr documentation built on Oct. 1, 2024, 2:18 p.m.