Week 9: Import and Tidy Data
Today’s Question
How do we turn a messy file into data ready for analysis?
Tidy Data
- Each variable is a column.
- Each observation is a row.
- Each value is a cell.
Import Checklist
- Are column names meaningful?
- Are types correct?
- Are missing values encoded consistently?
- Is one row one observation?
From MATLAB Data to R Data
The same habits used in the MATLAB project still matter:
- know what one row represents;
- check types, units, and missing values;
- generate results through code;
- verify before interpreting.
AI Check
Ask for a tidy structure, then decide whether the proposed structure matches the scientific meaning of the data.