Skip to content

Commit

Permalink
Style code
Browse files Browse the repository at this point in the history
  • Loading branch information
lizihao-anu authored and github-actions[bot] committed Sep 26, 2023
1 parent ebb6146 commit 6231e23
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions 00_Sort_BI_Extracts.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Define the source directory and financial year pattern
compress_files = FALSE
compress_files <- FALSE
source_dir <- "/conf/sourcedev/Source_Linkage_File_Updates/Extracts Temp"
pattern <- "-20(\\d{4})\\.csv"

Expand All @@ -13,7 +13,7 @@ print(stringr::str_glue("Found {length(csv_files)} csv files to process."))
extract_financial_year <- function(filename) {
match <- regexpr(pattern, basename(filename))
if (match[[1]][1] > 0) {
financial_year <- substr(basename(filename), match[[1]][1]+3, match[[1]][1] + 6)
financial_year <- substr(basename(filename), match[[1]][1] + 3, match[[1]][1] + 6)
return(financial_year)
} else {
return(NULL)
Expand All @@ -32,8 +32,8 @@ for (csv_file in csv_files) {
}

# compress file
if(compress_files){
cat("Compressing:", basename(csv_file),"\n")
if (compress_files) {
cat("Compressing:", basename(csv_file), "\n")
system2(
command = "gzip",
args = shQuote(csv_file)
Expand Down

0 comments on commit 6231e23

Please sign in to comment.