Error: Must group by variables found in `.data`. Column `day` is not found. Shiny

Hi!

To help us help you, could you please prepare a reproducible example (reprex) illustrating your issue? Please have a look at this guide, to see how to create one:

p.s. you probably don't have a shiny problem, so I recommend you try to implement your logic in a non-shiny script till you are confident it would work as desired with a view to subsequently translating it into a shiny context once you have mastered the transformations you wish.