Skip to contents

Scans all R scripts in slides/*/rsrc/ across all chapters, extracts package dependencies, and reports which are missing. Optionally installs them via pak::pak().

Usage

check_lecture_deps(lecture_dir = here::here(), install = FALSE)

Arguments

lecture_dir

Character. Path to the lecture directory. Defaults to here::here().

install

Logical. If TRUE, install missing packages without prompting. Default FALSE.

Value

Invisibly: A list with all (all detected packages) and missing (packages not currently installed).

Examples

if (FALSE) { # fs::dir_exists(here::here("lecture_i2ml"))
check_lecture_deps(lecture_dir = here::here("lecture_i2ml"))
}