anova_test: Each row of output must be identified by a unique combination of keys

Hello, I hope you don't mind, your code in the post above was preceded by the blockquote marker >
so it wasn't appearing correct. I switched it to backticks ``` for better formatting.

When you use a pipe to pass the data on the left into the function on the right, it must be incorrect to also supply a data param on the function on the right , no ?

anova_test() wants data with unique id's , I think the wid param can be used to make it explicit. Does your data have a concept of unique ID's ? is it the product of making observations, which can be identified in a principled way?

You did share two, errors, that different in their complaint, but with roughly the same code, only with changed data, so if the issues are data related, we will be hardpressed to assist without access to a representative data.
Consider if you can provide a reprex if thinking about the above points doesn't allow your issue to be resolved.