convert_datim_pd_to_qtr: Convert DATIM CY Quarter/Period to FY Quarter

View source: R/covert_date_period.R

convert_datim_pd_to_qtrR Documentation

Convert DATIM CY Quarter/Period to FY Quarter

Description

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

Usage

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

## Not run: 
df <- tibble::tibble(Periods = c("October - December 2023",
                                 "January - March 2024",
                                 "October 2023 to September 2024"))
df <- convert_datim_pd_to_qtr(df) 
## End(Not run)

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