What is the difference between the single bracket [, double bracket [[, and $ operators for subsetting in R?
Role: Data Scientist
Category: Data Manipulation (SQL/Python)
Difficulty: easy
Interview Round: Other
Overview: Asks how the single bracket, double bracket and dollar operators differ when subsetting lists, vectors and data frames in R. Tests your understanding of what each operator returns, how names are matched, and how dropped dimensions and missing names cause subtle bugs.