diff --git a/General Health/2. General Health SLF Data.R b/General Health/2. General Health SLF Data.R index a646bae..824c867 100755 --- a/General Health/2. General Health SLF Data.R +++ b/General Health/2. General Health SLF Data.R @@ -105,7 +105,9 @@ ltc_data <- left_join(ltc_agg, slf_pops) #### SAVE DATA #### -saveRDS(ltc_data, file = paste0( - lp_path, "General Health/DATA ", - ext_year, "/LTC_from_SLF.RDS" -)) +arrow::write_parquet( + ltc_data, + paste0(lp_path, "General Health/DATA ", ext_year, "/LTC_from_SLF_Moray_custom.parquet"), + version = "latest", + compression = "zstd" +) diff --git a/General Health/3. General Health Outputs.R b/General Health/3. General Health Outputs.R index 45d0d91..a4d6095 100755 --- a/General Health/3. General Health Outputs.R +++ b/General Health/3. General Health Outputs.R @@ -148,7 +148,9 @@ check_missing_data_scotpho(adp_presc) # Long-term conditions -ltc <- readRDS(paste0(lp_path, "General Health/DATA ", ext_year, "/LTC_from_SLF.RDS")) +ltc <- arrow::read_parquet( + paste0(lp_path, "General Health/DATA ", ext_year, "/LTC_from_SLF_Moray_custom.parquet") +) ltc <- dplyr::rename(ltc, "Arthritis" = "arth", "Asthma" = "asthma", "Atrial fibrillation" = "atrialfib", "Cancer" = "cancer",