What are the performance and memory trade-offs between a data.frame, a matrix, and a data.table?
Role: Data Scientist
Category: Data Manipulation (SQL/Python)
Difficulty: medium
Interview Round: Other
Overview: Compares an R matrix, data.frame and data.table on storage layout, memory use when data is modified, and speed for linear algebra, filtering, joins and grouped aggregation. Tests whether you understand copy-on-modify, modification by reference, and when each structure fits the job.