From 7b1619f2bed58b19a4c0a3a7440339f5a9cfd2dd Mon Sep 17 00:00:00 2001 From: carriewright11 Date: Sun, 7 Jun 2026 21:40:14 -0600 Subject: [PATCH 1/2] add combining pdf script --- scripts/make_combined_pdfs.R | 48 ++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 scripts/make_combined_pdfs.R diff --git a/scripts/make_combined_pdfs.R b/scripts/make_combined_pdfs.R new file mode 100644 index 00000000..fb03736a --- /dev/null +++ b/scripts/make_combined_pdfs.R @@ -0,0 +1,48 @@ +library(qpdf) + +topic_order <- c( + "Intro", + "Basic_R", + "Rstudio", + "Reproducibility", + "Data_Input", + "Subsetting_Data_in_R", + "Data_Classes", + "Data_Cleaning", + "Manipulating_Data_in_R", + "Esquisse_Data_Visualization", + "Data_Visualization", + "Factors", + "Statistics", + "Data_Output", + "Functions" +) + +pdf_files <- unlist( + lapply(topic_order, function(topic) { + list.files( + file.path("modules", topic), + pattern = "\\.pdf$", + full.names = TRUE + ) + }) +) + +pdf_combine(pdf_files, output = "resources/course_notes.pdf") + +### make combined cheatsheet file + +# Find all PDFs in cheatsheets +pdf_files <- list.files( + path = "modules/cheatsheets", + pattern = "\\.pdf$", + recursive = FALSE, + full.names = TRUE +) + +# Combine into a single PDF +pdf_combine( + input = pdf_files, + output = "resources/all_cheatsheets.pdf" +) + From 5a31c8ce2ecd215a7268e306399e4fb17f072e86 Mon Sep 17 00:00:00 2001 From: Carrie Wright <23014755+carriewright11@users.noreply.github.com> Date: Mon, 8 Jun 2026 15:59:17 -0600 Subject: [PATCH 2/2] Apply suggestion from @carriewright11 --- scripts/make_combined_pdfs.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/make_combined_pdfs.R b/scripts/make_combined_pdfs.R index fb03736a..56ad24c2 100644 --- a/scripts/make_combined_pdfs.R +++ b/scripts/make_combined_pdfs.R @@ -1,5 +1,5 @@ library(qpdf) - +### make combined slides file topic_order <- c( "Intro", "Basic_R",