Run all scripts in a chapter and track produced figures
run_chapter_scripts.RdRuns each R script in a chapter's rsrc/ directory sequentially in
isolated subprocesses. For each script, snapshots the figure/ directory
before and after execution to determine which figure files were
created or modified.
Arguments
- chapter
Character. Chapter directory name, e.g.
"evaluation".- lecture_dir
Character. Path to the lecture directory. Defaults to
here::here().- lecture
Character. Lecture name for display purposes. Defaults to
basename(lecture_dir).- pattern
Regex pattern to filter script filenames. Default
"[.]R$".- timeout
Numeric. Per-script timeout in seconds. Default 300.
Value
A data.frame with columns:
script_file: Script filename.script_path: Absolute path.success: Logical.error_message: Character.elapsed: Numeric seconds.figures_produced: List column of character vectors (filenames created/modified).