How do you perform data reshaping using tidyr functions like pivot_longer() and pivot_wider()?
Role: Data Scientist
Category: Data Manipulation (SQL/Python)
Difficulty: medium
Interview Round: Other
Overview: Asks how to reshape data in R with tidyr's pivot_longer() and pivot_wider(), moving between wide and long formats. It tests the key arguments, handling of missing values and duplicate keys, splitting compound column names, and when a round trip does not return the original table.