Module 03 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. A data frame is a list with one constraint, namely that…
- A. all elements are numeric
- B. all elements have the same length
- C. there are at most 1000 rows
- D. the first column is an identifier
2. base_df$vis returning the visits column is an example of…
- A. a tibble feature
- B. partial name matching in base data frames
- C. a typo R corrected
- D. column recycling
3. A numeric column arriving from read_csv() as character usually means…
- A. the file is corrupt
- B. a value in the column is not a number, such as a missing marker
- C. the file has too many rows
- D. readr needs a different package
4. The most important reason to name the sheet when reading a workbook is…
- A. it reads faster
- B. the default is the first sheet, which is often a cover note
- C. otherwise all sheets are combined
- D. readxl cannot guess the file type
5. Saving a cleaned tibble as CSV rather than RDS costs you…
- A. nothing; they are equivalent
- B. the factor levels and their order
- C. the column names
- D. the row order
---
Answer Key and Explanations
Check these only after attempting every question.
1. B — all elements have the same length
Equal lengths are what make the elements line up as columns and give 'row 3' a meaning.
2. B — partial name matching in base data frames
It works until a column called visitors arrives, at which point the meaning changes silently. Tibbles return NULL instead.
3. B — a value in the column is not a number, such as a missing marker
That is evidence about the file. Naming the missing markers at the read keeps the decision visible.
4. B — the default is the first sheet, which is often a cover note
The default read succeeds and returns the wrong table, which is exactly how this fails in practice.
5. B — the factor levels and their order
CSV is text and has no types. Factor level order determines the order of bars in a chart, so losing it quietly changes your figures.
Practical Check
Apply this module to your own work: complete the module activity for *Data Frames, Tibbles, Import, and Inspection*, 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.
