Why are explicit loops often discouraged in R, and how do the apply family and purrr's map_* functions replace them?
Role: Data Scientist
Category: Data Manipulation (SQL/Python)
Difficulty: easy
Interview Round: Other
Overview: Asks why R programmers tend to avoid explicit for loops and how the base apply family and purrr's map functions express iteration instead. It tests knowledge of return types, type safety, vectorization and the performance pitfalls of loops in R.