Initial commit: illustrative R data pipeline

This commit is contained in:
2026-03-09 14:20:10 -04:00
commit 83e50d2c36
12 changed files with 277 additions and 0 deletions

17
scripts/08_format.R Normal file
View File

@@ -0,0 +1,17 @@
# 07_format.R
# Reads final result, rounds all numeric columns to 2 decimal places.
source("scripts/00_paths.R")
library(readr)
library(dplyr)
df <- read_csv(result, show_col_types = FALSE)
df_formatted <- df |>
mutate(across(where(is.numeric), ~ round(.x, 2)))
write_csv(df_formatted, formatted)
cat("07_format.R: rounded to 2 decimals, wrote df_formatted.csv\n")
print(df_formatted)