From e715be6634f4193de5465d06927576f04b8b2151 Mon Sep 17 00:00:00 2001 From: Hannes Datta Date: Sun, 7 Mar 2021 12:52:43 +0100 Subject: [PATCH] debug makefile (#9) * debug makefile replace R CMD BATCH by RScript - RScript stops on error, while R CMD BATCH doesn't throw errors. Bad for students learning whether make works or not. * Update makefile changed `RScript` to `Rscript` Co-authored-by: rgreminger <31468142+rgreminger@users.noreply.github.com> --- makefile | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/makefile b/makefile index 87d4867..9caf52a 100644 --- a/makefile +++ b/makefile @@ -22,30 +22,30 @@ gen/paper/output/paper.pdf: gen/paper/output/table1.tex \ # Generate tables gen/paper/output/table1.tex: gen/analysis/output/model_results.RData \ src/paper/tables.R - R CMD BATCH src/paper/tables.R + Rscript src/paper/tables.R # Run analysis gen/analysis/output/model_results.RData: gen/data-preparation/output/data_cleaned.RData \ src/analysis/analyze.R - R CMD BATCH src/analysis/update_input.R - R CMD BATCH src/analysis/analyze.R + Rscript src/analysis/update_input.R + Rscript src/analysis/analyze.R # Clean data gen/data-preparation/output/data_cleaned.RData: data/dataset1/dataset1.csv \ data/dataset2/dataset2.csv \ src/data-preparation/merge_data.R \ src/data-preparation/clean_data.R - R CMD BATCH src/data-preparation/update_input.R - R CMD BATCH src/data-preparation/merge_data.R - R CMD BATCH src/data-preparation/clean_data.R + Rscript src/data-preparation/update_input.R + Rscript src/data-preparation/merge_data.R + Rscript src/data-preparation/clean_data.R # Download data data/dataset1/dataset1.csv data/dataset2/dataset2.csv: src/data-preparation/download_data.R - R CMD BATCH src/data-preparation/download_data.R + Rscript src/data-preparation/download_data.R # Clean-up: Deletes temporary files # Note: Using R to delete files keeps platform-independence. # --vanilla option prevents from storing .RData output clean: - R CMD BATCH --vanilla src/clean-up.R + Rscript --vanilla src/clean-up.R