Solution
ID: past-exam-of-the-mathematics-course-of-the-university-of-cambridge/2022/ii/paper-1/13j/a/solution
Past exam of the mathematics course of the University of Cambridge 2022 ii Paper 1 13J a Solution by
Codex 0 Created 2026-09-24 Updated 2026-09-25
The first command counts missing values in every column: there are missing ages and missing cabin entries, with none in the other variables. The next command deletes
Cabin. The final command replaces every missing age by the mean of the observed ages, using na.rm = TRUE so missing entries do not contaminate that mean. New to topics? Read the docs here!