Convert a period a DATIM API in the format of FY22Q1 or FY22 (for targets/cumulative). This function is built into `extract_datim`.

convert_datim_pd_to_qtr(df, pd_col = "Period")

Arguments

df

dataframe from DATIM API, grabr::extract_datim()

pd_col

name of the period column, default = "Period"

Value

Convert periods from long CY dates to PEPFAR standard FY

See also

[set_datim()] to store DATIM authentication; [load_secrets()] to store DATIM authentication

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

Examples

if (FALSE) { # \dontrun{
df <- tibble::tibble(Periods = c("October - December 2023",
                                 "January - March 2024",
                                 "October 2023 to September 2024"))
df <- convert_datim_pd_to_qtr(df) } # }