-
Notifications
You must be signed in to change notification settings - Fork 422
Closed
Labels
featurea feature request or enhancementa feature request or enhancementpivoting ♻️pivot rectangular data to different "shapes"pivot rectangular data to different "shapes"
Description
Hello, I have found that the pivot_ family error messages are much less helpful than spread and gather error messages. For example, here's an error message from the exact same dataset that had a few rows with repeated values, using pivot_wider vs spread.
The spread error message tells me exactly where the issue is. The pivot_wider one is very difficult to understand and doesn't point me to the error. When I added values_fn = length to the pivot call I got another error, Error: 1 components of ...were not used. We detected these problematic arguments: *vaues_fn``
Could you please consider incorporating some of the old context?
pivot_wider:
Warning message:
Values are not uniquely identified; output will contain list-cols.
* Use `values_fn = list` to suppress this warning.
* Use `values_fn = length` to identify where the duplicates arise
* Use `values_fn = {summary_fun}` to summarise duplicates
spread:
Error: Each row of output must be identified by a unique combination of keys.
Keys are shared for 6 rows:
* 427, 428
* 540, 541
* 800, 802
(edited to add text for error messages)
hjohns12, dhmontgomery, ryanvmenezes, amkessler, caitlingilbert and 2 more
Metadata
Metadata
Assignees
Labels
featurea feature request or enhancementa feature request or enhancementpivoting ♻️pivot rectangular data to different "shapes"pivot rectangular data to different "shapes"