When I use dplyr's pivot_wider and there are not uniquely identified rows, I get the following error:
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
I'm interested in the summary of duplicates, but when I set values_fn = summary_fun or values_fun = {summary_fun} it throws an error. How do I actually summarize duplicates in the way intended by the values_fn parameter?