Module 01 Knowledge Check
5 questions. Pass mark 4 out of 5. Answer every question before checking the answer key below, then retry after reading the feedback.
1. The strongest reason to use R rather than a spreadsheet for a recurring monthly figure is…
- A. R is faster at arithmetic
- B. the steps are recorded and can be re-run
- C. spreadsheets cannot handle large files
- D. R produces better-looking charts
2. The console and a script differ mainly because…
- A. the console is slower
- B. scripts can hold more code
- C. a script is a file that survives a restart and can be sent to someone
- D. the console cannot load packages
3. The rule that makes 'delete everything and re-run' a safe move is…
- A. keeping a backup of the outputs
- B. nothing your code writes goes into the raw folder
- C. committing to version control daily
- D. using a project file in your editor
4. A colleague cannot run your script. The likeliest single cause is…
- A. a missing package
- B. an absolute path containing your username
- C. a different R version
- D. a corrupted data file
5. Printing the row count after each step is worth doing because…
- A. it makes the script run faster
- B. it satisfies a style guide
- C. it localises a bug to the step that caused it
- D. R requires it before summarise()
---
Answer Key and Explanations
Check these only after attempting every question.
1. B — the steps are recorded and can be re-run
The record is the deliverable. A spreadsheet gives you the number and your memory of how you got it.
2. C — a script is a file that survives a restart and can be sent to someone
The console runs a line and forgets it. A script runs top to bottom and is the thing you hand over.
3. B — nothing your code writes goes into the raw folder
If code can overwrite the raw data, re-running changes its own inputs and the second run is a different experiment.
4. B — an absolute path containing your username
Relative paths travel. An absolute path embeds your account name and folder layout and works on exactly one machine.
5. C — it localises a bug to the step that caused it
A row count that changed unexpectedly tells you which line broke the analysis, instead of leaving you with a wrong final table.
Practical Check
Apply this module to your own work: complete the module activity for *R Setup, Projects, and Quarto Workflow*, then write one sentence naming what your result shows and one naming what it does not.
Strong Answer Pattern
A strong answer names the task, the evidence used, the check performed, and the remaining limitation. It avoids "proved", "guaranteed", or "always" unless the evidence genuinely supports it.
