Skip to content

Commit

Permalink
Style code
Browse files Browse the repository at this point in the history
  • Loading branch information
Jennit07 authored and github-actions[bot] committed Mar 19, 2024
1 parent 2cbccc9 commit 7842647
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions R/get_sandpit_extract_path.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@
#' @export
#' @family social care sandpit extract paths
#' @seealso [get_file_path()] for the generic function.
get_sandpit_extract_path <- function(type = c("at", "ch", "hc",
"sds", "client", "demographics"),
get_sandpit_extract_path <- function(type = c(
"at", "ch", "hc",
"sds", "client", "demographics"
),
year = NULL,
update = latest_update(), ...) {

dir <- fs::path(get_slf_dir(), "Social_care", "Sandpit_Extracts")

file_name <- dplyr::case_match(
Expand All @@ -25,14 +26,14 @@ get_sandpit_extract_path <- function(type = c("at", "ch", "hc",
"hc" ~ "sandpit_hc_extract",
"sds" ~ "sandpit_sds_extract",
"client" ~ "sandpit_sc_client_extract",
"demographics" ~ "sandpit_sc_demographics_extract")
"demographics" ~ "sandpit_sc_demographics_extract"
)

if (type == "client") {
sandpit_extract_path <- fs::path(dir, stringr::str_glue("{file_name}_{year}_{update}.parquet"))
}else{
sandpit_extract_path <- fs::path(dir, stringr::str_glue("{file_name}_{update}.parquet"))
sandpit_extract_path <- fs::path(dir, stringr::str_glue("{file_name}_{year}_{update}.parquet"))
} else {
sandpit_extract_path <- fs::path(dir, stringr::str_glue("{file_name}_{update}.parquet"))
}

return(sandpit_extract_path)
}

0 comments on commit 7842647

Please sign in to comment.