`read_psd` imports a stored PEPFAR Structured Datasets (.zip, .txt, or .parquet). The function will read in a MSD, Genie, Financial or HRH PEPFAR dataset, ensuring the column types are correct. The user has the ability to store the txt file as a rds or parquet file, significantly saving storage space on the computer (and can then remove the txt file after importing). Most of USAID/OHA processes and analyses rely on the use of the MSD file being read in via `read_psd`. This function can be used in the PDAP space in addition to working locally.

read_psd(file, export_format = "none", remove_base_file = FALSE)

Arguments

file

enter the full path to the PEPFAR structured dataset file

export_format

if desired, save the PSD in another compressed format, either "rds" or "parquet", default = "none"

remove_base_file

should original base file be removed if exporting in another compressed format? default = FALSE

Examples


if (FALSE) {
#convert Q1 clean PSNU file from txt to Rds
#read in file for use
 path <- "~/Data/MER_Structured_Datasets_OU_IM_FY22-24_20240315_v2_1.zip"
 df_psnu <- read_psd(path) }