What does the table() function do and how is it used for cross-tabulation?
Role: Data Scientist
Category: Data Manipulation (SQL/Python)
Difficulty: easy
Interview Round: Other
Overview: Asks what the R table() function returns and how to use it to cross-tabulate two or more categorical variables. Tests practical R skills: frequency counts, contingency tables, proportions by margin, totals, missing values and related tools such as xtabs().