21 lines
583 B
R
21 lines
583 B
R
# Fix indentation for lines 408-1022 in 80_calculate_kpis.R
|
|
# These lines should be inside the else-if block at the CANE_SUPPLY_WORKFLOW level
|
|
|
|
file_path <- "r_app/80_calculate_kpis.R"
|
|
lines <- readLines(file_path)
|
|
|
|
# Lines 408-1021 (0-indexed: 407-1020) need 2 more spaces of indentation
|
|
for (i in 408:1021) {
|
|
if (i <= length(lines)) {
|
|
line <- lines[i]
|
|
# Skip empty or whitespace-only lines
|
|
if (nchar(trimws(line)) > 0) {
|
|
# Add 2 spaces
|
|
lines[i] <- paste0(" ", line)
|
|
}
|
|
}
|
|
}
|
|
|
|
writeLines(lines, file_path)
|
|
cat("Fixed indentation for lines 408-1022\n")
|